Hi, I am a newbie and this is my first time here so please go easy on me,lol.
On to my question. I have a timer that calls a function that throws balloons every 3 seconds forever,how do I shorten the delay time so the balloons are thrown faster?
I tried replacing the delay time with a variable so i can change it if conditions are met in the balloon throwing function, but i does not work.
I know the value changes as I want it because I output it. But the timer ignores it. Can the timer parameters be defined only before run time?
Example:
local count = 0
local delayTime = 3000
local function balloonFunction()
if(count > 5)then
delayTime = 2000
end
throwBallon()
count = count + 1
end
local throwBalloonLoop = timer.performWithDelay(delayTime, balloonFunction, 0)