How to wait in defold

As you wrote, in Defold you have timer.delay(). Basic usage:

timer.delay(1, false, function()
    ...
end)

This will trigger your function after 1 second once (false - no repeating)

timer.delay(1, true, function()
    ...
end)

This will trigger your function every 1 second (true - repeating)


There is an asset called “Def Timeline” that might be useful for you, but it’s pretty old (let me know if it’s working or not if you decide to try it :wink: ):