Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Need help with timer function

I have some problems concerning the timer function.
this is what i want to achieve (simplified):

when the hero enters a dungeon, a timer starts to count down. If the hero can't find the exit before the timer goes to 0, the hero will die. If the hero finds the exit in time, the timer stops, and he will survive.

I tried to do this with switches, but the main problem i have is that the timer keeps counting down, also when the hero has found the exit. So can anyone help me making this work?
 

Fusty

Sponsor

This method is for Rmxp, I don't know if it will work in VX.

First you make an event that activates the timer:

@> Control Timer: Startup (0 min. 5 sec.)
this is just an example ofcourse, you have to put your own time limit here.

Then on the same event activate a switch that activates a Common Event.
Set the trigger of the common event to parallel, select the switch you activated on the other event at Condition Switch and make it look like this:

@> Conditional Branch: Timer 0 min 0 sec or less
@> Game Over
@>
: Else
@>
: Branch End
@>

When the player reaches the exit in time stop the timer with an event and it should work.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top