Im trying to detect when the animation stops and to change automatically when this happens.
Tried to do it with the onStopAnimation event but couldn't do it.
Here is the way im trying:
function Cchar:onEnterFrame_char(event)
if self.anim:animationRunning() == false then
print(self.anim:getAnimation())
if self.anim:getAnimation() == "SHOOT_LEFT" then
self.anim:setAnimation("STAND_LEFT")
self.anim:playAnimation()
end
if self.anim:getAnimation() == "SHOOT_RIGHT" then
self.anim:setAnimation("STAND_RIGHT")
self.anim:playAnimation()
end
end
end
It seems that it works fine, changes the animation and everything, but it doesn't start playing....
Comments
just tested but i can't find problem here...
if you can send me some working code with the problem i can try to help...
tried example3 on last tnt Animator release ?
i modded to recreate your situation but works fine here (test on device).
www.tntengine.com
I don't know how that could affect it... anyway thanks for your time!