Hi, everybody
Hope I’m not being too annoying…
As I said in my previous topic I am a beginner trying to make a virtual pet-like app.
I have a function for everything that happens in-game
function getHungry() is supposed to make pet hungrier, something like this:
function inGame()
(…)
local function getHungry()
hunger = hunger + 1
end
timer.performWithDelay( 1000, getHungry, 0 )
getHungry()
GOTHungry()
end
later I have a function to show the changes of the pet if it gets hungry(for now it turns black):
function GOTHungry()
if hunger>10 then
pet:setFillColor(0,0,0,255)
end
end
I just can’t get the timer to work… What am I doing wrong?
Thanks!
[import]uid: 161390 topic_id: 29097 reply_id: 329097[/import]

thanks [import]uid: 161390 topic_id: 29097 reply_id: 117053[/import]
[import]uid: 161390 topic_id: 29097 reply_id: 117075[/import]