Trying to trigger a timer and keep it running. Please Help!
Hello All,
I want to trigger a timer to start when I reach a certain height on the screen and have the timer continue counting down. (Basically if actor y=40 start timer counting down from 5 to zero.) I got it working but it only counts down if the actor stays at the position. I need the timer to keep counting down after the actor leaves from the spot where it triggered the timer. Hopefully this isn't confusing. Thanks in advance!
Thanks,
killerpenguins
I want to trigger a timer to start when I reach a certain height on the screen and have the timer continue counting down. (Basically if actor y=40 start timer counting down from 5 to zero.) I got it working but it only counts down if the actor stays at the position. I need the timer to keep counting down after the actor leaves from the spot where it triggered the timer. Hopefully this isn't confusing. Thanks in advance!
Thanks,
killerpenguins
Comments
create a game.timer(integer)->5
have a rule that if actor self.position.y =/> 40
change attribute game.countdown to true
In the timer rule have something like this
when game.countdown = true
timer every 1 sec,(click run to completion)
change game.timer = game.timer-1
then another rule when
game.timer=0
change attribute game.countdown = false
change attribute game.timer = 5
Hope this is clear enough for you :P
I'm assuming that when you are saying to create a game.countdown trigger(boolean)-False and to
create a game.timer(integer)->5, you are talking about creating them in the game's attributes? and thanks again
else it would be self.countdown.
Thanks,
killerpenguins
Thanks,
killerpenguins