Skip to content
User Avatar
#1954
Auto-translated
RedHeavenHero

function play_anims()
if GetCurrentPlayer() ~= 1 then return end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'region_name', nil)
PlayObjectAnimation("creature", "animation", ANIMATION_PLAY_METHOD)
sleep(3) -- pauses will likely be needed between animation plays
PlayObjectAnimation("creature", "animation", ANIMATION_PLAY_METHOD)
sleep(3)
PlayObjectAnimation("creature", "animation", ANIMATION_PLAY_METHOD)
-- ... --
end

Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'region_name', 'play_anims')
To make the script work, you will need a region; when a hero enters it, the animation will be triggered.

Added 1 minute ago

The animation will only play if no other animation (other than "idle00") is currently playing on the object.
What are the different ways to play animations?