In Skyrim, the console command to set a follower as essential is not working. What am I doing wrong?

I am trying to change my companion to essential so they don't keep dying on me. However, the console command is not working for some reason.

The code:

setessential <baseID> 1

should work (it has worked before with others), but when I type

isessential <baseID>

it comes back to 0. I can confirm it's not working, because my follower is still dying, which would not happen if they were essential.

Why is it not working? What am I doing wrong?


Solution 1:

I discovered that if I have them selected, and do this, then it doesn't work. However, if I make sure that nothing is selected, then if works. What I mean, is, in the console, when you have something selected, you can see the refID. If you can see any refID, then setessential will not work. It works if you have nothing selected.

Solution 2:

From http://uesp.net/wiki/Skyrim:Console#Targeted_Commands :

Usage of the 'setessential' console command is: setessential <base ID> <1/0> - set a character (NPC) as immortal (1) or mortal (0).

Note that the base ID and not the ref ID must be used. The ref ID is what appears when clicking on an object with the console open. To find an NPC's base ID, however, you can either a) browse to their respective page (see: People and/or NPCs) or b) use the help function in-game to search for them by name, recording whatever value matches their name under the "NPC_" category of result. Once you have the base ID, enter the command using either 1 to set him/her immortal or 0 to set him/her mortal. For example, setessential a2c8e 1 would set Lydia as immortal.