Domanda

I have a tween animation, and I need to launch a function with parameters after it completes.

I was unable to find any sleep command in Lua without loading the CPU, but then the animation freezes. I tried onComplete, but it doesn't wait for the animation to end and it executes that function right after the delay timer is over (just when the animation starts).

I have been looking for a solution for 3 hours straight, but I was unable to find anything. Please help.

È stato utile?

Soluzione

Marmalade quick includes luasocket, which has a sleep function.

Update

Another options could be setting up a timer and let the timer fire your function after the delay you need.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top