Topic: isAnimationOver?(help)
I can't seem to understand how isAnimationOver() works. How do I get animations to play in succession? Here is the code:
function Animate(anim_object,anim_walk,anim_btn,anim_speed)--,anim_sound)
if isKeyPressed(anim_btn) then
idle = false
walking = true
changeAnimation(anim_object,anim_walk)
setAnimationSpeed(anim_object,anim_speed)
--playSound(anim_sound)
elseif onKeyUp(anim_btn) then
idle = true
walking = false
changeAnimation(anim_object,1)
if isAnimationOver(anim_object) then
changeAnimation(anim_object,2)
setAnimationSpeed(anim_object,.3)
end
--stopSound(anim_sound)
end
end
I want the character to play a certain animation when a key is released. And then, after it plays that animation, I want it to play another animation (I would think this animation continues to play).
However, in this code, the first animation plays and the next animation never plays, it just keeps playing the first animaton (animation 1).
Last edited by Tutorial Doctor (2013-10-23 19:15:53)