Difference between revisions of "PlayIdle - Actor"
Jump to navigation
Jump to search
imported>Terra Nova2 m (Added example for forcing actor to play idle with hands bound. Hmm kept getting 502 error when trying to comment out first line.) |
imported>SureAI-Nicolas |
||
Line 34: | Line 34: | ||
== Notes == | == Notes == | ||
Too many things can happen while you are attempting to play an idle, so make sure to gracefully handle all circumstances. '''Never''' use the structure "play idle, wait for event" - this will inevitably cause your script to get stuck forever when some other code or script overrules your idle. | Too many things can happen while you are attempting to play an idle, so make sure to gracefully handle all circumstances. '''Never''' use the structure "play idle, wait for event" - this will inevitably cause your script to get stuck forever when some other code or script overrules your idle. | ||
Calling the PlayIdle function on the same actor, with the same idle again, will have the actor stop playing it (if it's a looped animation). | |||
== See Also == | == See Also == |
Revision as of 10:40, 17 July 2014
Member of: Actor Script
Plays the idle passed.
Syntax
bool Function PlayIdle(Idle akIdle) native
Parameters
- akIdle: The idle form to whose animation to play on this actor.
Return Value
True if the idle was successfully loaded and played, false otherwise.
Examples
; Start Hadvar's flute animation
if Hadvar.PlayIdle(fluteIdle)
Debug.Trace("Hadvar is playing his flute!")
else
Debug.Trace("Something went wrong")
endIf
Force Prisoner idle
Idle property OffsetBoundStandingStart auto
myActor.PlayIdle(OffsetBoundStandingStart)
Notes
Too many things can happen while you are attempting to play an idle, so make sure to gracefully handle all circumstances. Never use the structure "play idle, wait for event" - this will inevitably cause your script to get stuck forever when some other code or script overrules your idle.
Calling the PlayIdle function on the same actor, with the same idle again, will have the actor stop playing it (if it's a looped animation).