Difference between revisions of "PlayAnimation - ObjectReference"
Jump to navigation
Jump to search
imported>Jlundin |
imported>MoopusMaximus |
||
Line 21: | Line 21: | ||
Switch.PlayAnimation("flip") | Switch.PlayAnimation("flip") | ||
</source> | </source> | ||
== Notes == | |||
PlayAnimation() cannot be cast on Actors. You must use [[Debug.SendAnimationEvent()]] | |||
== See Also == | == See Also == | ||
*[[ObjectReference Script]] | *[[ObjectReference Script]] | ||
*[[PlayAnimationAndWait - ObjectReference]] | *[[PlayAnimationAndWait - ObjectReference]] |
Revision as of 18:55, 19 February 2012
Member of: ObjectReference Script
Starts playing the specified animation on the object and returns immediately. (Internally, it sends the named event to the object's animation graph) If it succeeds, it returns true.
Syntax
bool Function PlayAnimation(string asAnimation) native
Parameters
- asAnimation: The animation to play. (The name of the event to send to the animation graph)
Return Value
True if the animation successfully started playing.
Examples
; Play the "flip" animation on the switch
Switch.PlayAnimation("flip")
Notes
PlayAnimation() cannot be cast on Actors. You must use Debug.SendAnimationEvent()