Difference between revisions of "SetRefEssential"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
m (Reverted edits by CSbot (Talk); changed back to last version by DragoonWraith)
imported>QQuix
(Added a note about references x Base Obect)
 
Line 12: Line 12:
* Must be called on a reference to an actor.
* Must be called on a reference to an actor.
* Set to 1 to flag the reference as essential or 0 to clear the flag.
* Set to 1 to flag the reference as essential or 0 to clear the flag.
* Although used on a reference, this function changes the Essential flag on the Base Object, thus affecting all references from that Base Object


'''Example:'''
'''Example:'''

Latest revision as of 09:51, 27 September 2015

A command for Oblivion Script Extender

Syntax:

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

Sets the calling ref to be essential or not.

Notes[edit | edit source]

  • 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.
  • Although used on a reference, this function changes the Essential flag on the Base Object, thus affecting all references from that Base Object

Example:

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

See Also[edit | edit source]

IsRefEssential