Time-Based Events?

Status
Not open for further replies.

Pearsona

Trash Goblin
Veteran
Joined
Nov 12, 2013
Messages
92
Reaction score
48
First Language
English
Primarily Uses
RMMV
I am making a horror game, and one of the scenes is a chase scene, which ends with the player going into a room and locking the door. The player would have to solve a puzzle to escape, but if they took more than a certain set amount of time the monster chasing them would break the door down and attack them. However, I dont know how to make this event trigger. How would I go about making a time limit like this? (im not looking for an event that would put a timer in the corner of the screen, however)
 

Celianna

Tileset artist
Global Mod
Joined
Mar 1, 2012
Messages
10,555
Reaction score
5,576
First Language
Dutch
Primarily Uses
RMMV
You could also simply use two variables and a common event set to parallel process.


When your event begins, where the player has to escape, set a variable to Game Data > Other > Play Time. Then turn on a switch. Create a common event that runs on this switch, set it to parallel process. In it, set another variable to Play Time again. Subtract the first variable from the second, so you get the amount of time that has currently passed. Create a conditional branch that checks if the second variable is greater than or equal to X. X being the amount of seconds you want the player to have to escape. So this can be 60 which is 1 minute.


If true, trigger the event that makes the monster break down the door. Else, just do nothing :)


Don't forget to turn off the switch if the player manages to solve the puzzle.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,602
Reaction score
4,614
First Language
English
Primarily Uses
RMMV

@coffeeplayz , please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


I'm closing this thread.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Woke up on an awful nightmare of being banned here because some mod didn't liked me in a super-heroes freeform round robin RP where I used throwing normal hammer as power and it was qualified being too OP. XD Nice to read you all guys. Will not wait next nightmares.
Staring at all the RPG Maker versions I have and realizing that my project has been a long time coming. But, I finally feel like I have the knowledge and experience to make it into something good.
We're almost done with the jam game! :D
I get scam calls all the time so today I gave them a piece of my mind. They hung up on me. Sweet revenge.

Forum statistics

Threads
104,321
Messages
1,005,561
Members
135,844
Latest member
andrewshetty123
Top