SetRefEssential

From the Oblivion ConstructionSet Wiki
Revision as of 20:49, 21 March 2008 by imported>DragoonWraith (not a record variable function)
Jump to navigation Jump to search

A command for Oblivion Script Extender

Syntax:

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

Sets the calling ref to be essential or not.

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.isEssential == 0 )
  myNPCRef.setEssential 1 ; make the reference essential
endif

See Also

IsRefEssential