LeisaTheGreat 1 Posted December 21, 2015 I'm having some trouble with timers. I've looked at a few tutorials and forums but no one seems to be asking quite the right questions for me, so this is my problem... (Set scene) The player walks over to an event and interacts with it, thus triggering the switch "Chase" - which triggers a monster to chase them through the room and when they leave the room, begins a timer for them to find a hiding spot. If the timer runs out before they trigger "Chase" to be off by finding a hiding spot, it's supposed to Game Over. The monster works, the hiding spots work... But the timer either doesn't count down beyond 29 seconds, or (from me fiddling with it to try to get it work) breaks the game if they leave the room... I've never used timers before...help? (Screenshots below) Share this post Link to post Share on other sites
lonequeso 1,921 Posted December 21, 2015 The first screen doesn't work because oyu have a loop command for a parallel process event. Parallel Process events loop automatically so you're creating a conflict. I'v never actually used the timer command before. Is there a command to tell it when to start counting down? Share this post Link to post Share on other sites
LeisaTheGreat 1 Posted December 21, 2015 Ah, yeah that makes sense...woops XD And no, when you hit timer you can only start it (by specifying the amount of time to countdown) or stop it. I've started the timer but it won't countdown. Share this post Link to post Share on other sites
lonequeso 1,921 Posted December 21, 2015 Try making the Conditional Branch "0 or less" and getting rid of the "else". You don't need a branch if it counts down automatically. Maybe that's what's causing it to stop. So just: If timer is 0 or less then Game Over Share this post Link to post Share on other sites
LeisaTheGreat 1 Posted December 21, 2015 (edited) I tried it, and no luck. It stops at 29 seconds. EDIT: Oh and if you just put @>Control Timer: Startup 0 min. 30 sec. @>Game Over It automatically kills you... Edited December 21, 2015 by LeisaTheGreat Share this post Link to post Share on other sites
lonequeso 1,921 Posted December 21, 2015 (edited) Lol! That actually is helpful info though. If it automatically kills you, then it's dropping to zero right away. Parallel process events run every frame. So in one second, it process 60 times. I thought a timer would count down normally despite that. Below the Conditional branch, try adding a Wait command of 60 frames. See if it'll tick down normally. Edited December 21, 2015 by lonequeso Share this post Link to post Share on other sites
LeisaTheGreat 1 Posted December 21, 2015 New info! @>Control Timer: Startup 0 min. 30 sec. @>Conditional Branch @>GameOver @> :Branch End @Wait 60 frames Causes the timer to flick quickly between 30 seconds and 29 seconds... So the wait 60 frames caused me to be able to see that it was looping still... Now we just need to figure out how to get it to actually countdown. Share this post Link to post Share on other sites
lonequeso 1,921 Posted December 21, 2015 Oh duh. Since the parallel process loops, it's resetting the timer every time. You need to have the startup in a different event or a different event page. Share this post Link to post Share on other sites
LeisaTheGreat 1 Posted December 21, 2015 YES! That worked! Page 1 Chase switch on Trigger: Autorun @>Control Timer Start up 0 min 30 sec @>Control Self Switch A On Page 2 Chase switch on Self switch A on Trigger: parallel process @>Conditional Branch: Timer 0 min 0 sec or less @>Game Over @> :Branch End @>Conditional Branch: (Switch: Chase OFF) @>Control Timer: stop @> :Branch End @> THANKS SO MUCH FOR YOUR HELP! Share this post Link to post Share on other sites
lonequeso 1,921 Posted December 21, 2015 You're welcome Share this post Link to post Share on other sites
Rikifive 3,411 Posted December 22, 2015 This thread is closed, due to being solved. If for some reason you would like to re-open this thread, just send me a PM. (= Share this post Link to post Share on other sites