Jump to content
Sign in to follow this  
LeisaTheGreat

Timer issues?

Recommended Posts

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)

post-61501-0-28241700-1450715358_thumb.png

Share this post


Link to post
Share on other sites

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

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

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

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 by LeisaTheGreat

Share this post


Link to post
Share on other sites

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 by lonequeso

Share this post


Link to post
Share on other sites

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

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
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×