Reputation: 17
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.
Upvotes: 1
Views: 447
Reputation: 6985
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.
Upvotes: 0