Hi Danny,
yes that works but how can i combine the 2 codes, i have tried :
local function myFunction( event )
if event.count \>= 800 then
timer.cancel( event.source )
end
local timerTime = 1000
local function manageTimer()
local function getRandomStar()
print(timerTime)
if ( timerTime \>= 200 ) then manageTimer() ; timerTime = timerTime-50 end
end
starTimer1 = timer.performWithDelay( timerTime, getRandomStar, 1 )
end
manageTimer()
print( "I have executed:", event.count, " times." )
end
local myTimer = timer.performWithDelay( 1000, myFunction, 0 )
&
local timerTime = 1000
local function myFunction( event )
if event.count \>= 800 then
timer.cancel( event.source )
end
print( "I have executed:", event.count, " times." )
local function manageTimer()
local function getRandomStar()
print(timerTime)
if ( timerTime \>= 200 ) then manageTimer() ; timerTime = timerTime-50 end
end
starTimer1 = timer.performWithDelay( timerTime, getRandomStar, 1 )
end
end
local myTimer = timer.performWithDelay( 1000, myFunction, 0 )
manageTimer()
But both don’t work ? [import]uid: 225288 topic_id: 36154 reply_id: 143751[/import]