SetRefEssential

From The Elder Scrolls Construction Set Wiki

A command for Oblivion Script Extender

Syntax:

reference.SetRefEssential isEssential:bool
[Ref.]setRefEssential booleanFlag

Sets the calling ref to be essential or not.

[edit] Notes

  • Essential actors cannot be killed, only knocked unconscious.
  • Must be called on a reference to an actor.
  • Set to 1 to flag the reference as essential or 0 to clear the flag.

Example:

if ( myNPCRef.isRefEssential == 0 )
  myNPCRef.setRefEssential 1 ; make the reference essential
endif

[edit] See Also

IsRefEssential