PlayerModel:SetAnimation

From Warcraft Wiki
Jump to navigation Jump to search

Sets the animation to be played by the model.

PlayerModel:SetAnimation(anim [, variation])

Arguments

anim
number : AnimationDataEnum - An animation ID
variation
number? - The variation ID in the animation, when a model has more than one animation for an animation ID.

Example

myModel:SetAnimation(60) -- Play the talking animation

Details

  • Some models have more than one animation for a given animation ID (Blood Elf females for the talking animation for example). You can pass a variation ID to play a specific variation of the animation.
  • When the animation is over, the model stops being animated and freezes (except for looping animations).