I’m making a game where items drop after a delay. I want to modify the delay as the game goes on so that the items drop at a faster rate. Below I have a timer that recursively calls a function which modifies the timer parameters as the game progresses. When I call the function though it runs only once.
local dropTile = function()
newTile()
tilesDropped = tilesDropped + 1
if tilesDropped \>= tilesInLevel[level] then
level = level + 1
end
timer.performWithDelay( timerDelay[level], dropTile, 1 )
end
[import]uid: 3018 topic_id: 4742 reply_id: 304742[/import]