Difference between revisions of "SetEssential"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Tibixe
m
imported>DragoonWraith
m (Removed See Also section since there was no "also" to see.)
Line 9: Line 9:
Note that it will act as a ''return'' statement if ActorBase is a reference variable.  
Note that it will act as a ''return'' statement if ActorBase is a reference variable.  


==See Also==
[[Category: Functions]]
[[Category: Functions]]
[[Category: Statistics Functions]]
[[Category: Statistics Functions]]
[[Category:Actor Functions]]
[[Category:Actor Functions]]

Revision as of 21:23, 15 August 2006

Syntax:

SetEssential ActorBase bool 

Example:

SetEssential MyFavoriteNPC 1
SetEssential MyLeastFavoriteNPC 0

Sets the "essential" flag on an actor (1 or 0). When this flag is set to 1, the NPC/creature will not be killable -- when his health drops to 0 or below, an essential actor will be made temporary "unconscious". This is normally used to prevent the player from accidentally killing an NPC who is required to complete a quest.

Note that it will act as a return statement if ActorBase is a reference variable.