I’m trying to animate a couple of enemies between two points. The problem is that on the second turn one enemy get all the transitions and the other enemies just sand there.
The one that get all the animations (the first one) start hopping around every time a transition finishes.
Why?!
[code]
local function animeraFiende_Normal(inFiende, inTid, vandPunkt_L, vandPunkt_R)
function fiende_L()
print(inFiende.alive)
if inFiende.alive == “ja” then
print(“Vänster”)
print(inFiende.namn)
transition.to( inFiende, { time=inTid, x=vandPunkt_L, transition = easing.inOutQuad, onComplete=fiende_R } )
transition.to( inFiende, { xScale=-1 } )
end
end
function fiende_R()
if inFiende.alive == “ja” then
print(“Vänster”)
print(inFiende.namn)
transition.to( inFiende, { time=inTid, x=vandPunkt_R, transition = easing.inOutQuad, onComplete=fiende_L } )
transition.to( inFiende, { xScale=1 } )
end
end
fiende_L()
end
[/code] [import]uid: 28895 topic_id: 7365 reply_id: 307365[/import]
