Background for Skyrim SE
Member of the ObjectReference script
boolfunctionPlayAnimation(stringasAnimation)Native

Description

Wiki Description

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.

Documentation Comment

Start the specified animation playing - returns true if it succeeds


Caveats

CK Wiki - Notes

PlayAnimation cannot be called on actors. For actors, use Debug.SendAnimationEvent(...). This bypasses the check on ObjectReference that prevents sending events to actors. If you use it to send an event to actors, you may get the actor stuck in the animation (such as the bleed out animation). You can un-stick them by using PlayIdle(IdleStop_Loose).


Parameters

stringasAnimation

CK Wiki Description

The animation to play. (The name of the event to send to the animation graph)


Examples

; Play the "flip" animation on the switch
Switch.PlayAnimation("flip")

Auto-Generated Example

string myString__asAnimation

bool returnedValue = myObjectReference__toCallFunctionOn.PlayAnimation(myString__asAnimation)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.