Difference between revisions of "SetUnconscious"

174 bytes added ,  08:57, 12 May 2009
Converted to function template - elaborated on resurrecting potential
imported>Quarn
imported>Cipscis
(Converted to function template - elaborated on resurrecting potential)
Line 1: Line 1:
=='''Description'''==
{{Function
|CSWikiPage = SetUnconscious
|origin = GECK1
|summary = Turns an actor's conscious behaviour on or off.  Actors that are unconscious will not use AI behaviour and will not play idle sounds.  When an unconscious actor is activated, a message stating that the actor is unconscious will appear.
|referenceType = Actor
|arguments = {{FunctionArgument
  |Name = UnconsciousFlag
  |Type = int}}
|example = Protectron01REF.SetUnconscious 1
Protectron01REF will be set to be unconscious
}}


'''SetUnconscious''' turns a NPC's\creature's unconscious behavior on or off. NPCs\Creatures that are unconscious will not use AI behavior and will not play idle sounds.
==Notes==
*Using this on dead actors will cause them to be resurrected, but will not cause them to play a "get up" animation.  As with [[ResurrectActor]], this can cause various animation problems if not called in the same frame as the actor's death.


=='''Syntax'''==
==See Also==
 
*[[GetUnconscious]]
[''ActorREF''].SetUnconscious [[''0/1'']]
*[[ResurrectActor]]
 
=='''Examples'''==
 
Protectron01REF.SetUnconscious 1
 
Protectron01 is now unconscious, will not use AI, and will not play any sounds.
 
=='''Notes'''==
-Using this on dead NPC's\creature's will cause them to be resurrected with 1hp but still look like they are dead and as with any resurrection their inventories will be refreshed too.
 
=='''See Also'''==
[[GetUnconscious]]


[[Category:Functions]]
[[Category:Functions]]
Anonymous user