Difference between revisions of "IsRefEssential"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(not a record variable function)
imported>Low Post
m
Line 9: Line 9:


'''Example:'''
'''Example:'''
<pre>if ( myNPCRef.isEssential )
<pre>if ( myNPCRef.isRefEssential )
   myNPCRef.setRefEssential 0 ; remove the essential flag from the reference
   myNPCRef.setRefEssential 0 ; remove the essential flag from the reference
endif</pre>
endif</pre>

Revision as of 11:00, 16 July 2009

A command for Oblivion Script Extender

Syntax:

(isEssential:bool) reference.IsRefEssential
[Ref.]IsRefEssential

Must be called on a reference. Returns true if the reference is an essential actor (meaning they can't be killed, only knocked unconscious).

Example:

if ( myNPCRef.isRefEssential )
  myNPCRef.setRefEssential 0 ; remove the essential flag from the reference
endif

See Also

SetRefEssential