If someone could please help me with this runclock fnction for my app i need to run the clock then add 15 experience when the timer has been on for 1 hour i have the basic layout of the code and how it should look.
function runClock() – Example on the game loop for the simulation
for n=1,#heroArray do
heroArray[n]:update(1) – loops through the heroes and updates each one for 1 second
end
for n=1,#craftersArray do
craftersArray[n]:update(1)
end
runTimer = timer.performWithDelay(1000,runClock) – 1000 = 1 second. Runs the function when the timer expires
end
function runSleepClock() – Example on the game loop for the sleeping simulation
for n=1,#heroArray do
heroArray[n]:updateHero(60)
end
timer.performWithDelay(60000,runClock)
end [import]uid: 35843 topic_id: 27599 reply_id: 327599[/import]