To make the script work, you will need a region; when a hero enters it, the animation will be triggered.
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')
Added 1 minute ago
The animation will only play if no other animation (other than "idle00") is currently playing on the object.
Auto-translated