Skyrim Console: Is there a command the opposite of PRID?

FOR USE IN BAT FILES I need to deselect whatever is selected.

I know that for example prid 14 will select the player. Is there a command to deselect in this context?

prid, prid 0, and prid 14 again don't work.

I'm moving the player around in a custom situation. I had been using the little map flags as markers and using a bat to do player.moveto the flag, but that has a couple problems. What I wanted to do is unprid, tcl, prid 14, setpos <coords>, unprid... since tcl doesn't work if something is selected, I wanted to contain the entire thing from soup to nuts into a bat file.

However, I've discovered since posting this that prid in bat files doesn't work. It's ignored. So any unprid is likely to be as well.

What's close is to tcl ahead of time, and without prid just do player.setpos which is working ok, but will eventually become problematic.


Solution 1:

See the following from the UESP wiki:

Many commands are targeted: this means that you may use player.command to affect the player character; for example, type player.setav carryweight 1000 will set the Player's Carry Weight at 1000. Or, you may want to target the NPC/actor, by first typing prid , Enter. Then, type the command by itself, setav carryweight 1000, to affect the NPC, specified by (Note: including the zeroes at the beginning of the RefID when targeting NPCs may produce a "command not found" error. That can be evaded though by placing the RefID in quotes, e.g. "000A2C94".setav carryweight 1000 will set Lydia's Carry Weight at 1000).

https://en.uesp.net/wiki/Skyrim:Console#General_Information

I tried it for a command I was running on game load using script dragon, and it worked like a charm. Just put quotes around your object ID and it will allow the use of targeted commands with dot syntax.