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,554
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,601
Reaction score
4,611
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

I confirmed my train ticket yesterday. I'll be heading to Orlando on the 29th... last time I went, I found this little treasure!
Done with another simple battleback :LZYcheeze:
Anyone else find it amusing that people watch videos of tragedy and then try to take the "moral high ground" by having sympathy for the victims? Dude, you watched the tragedy for the same reason everyone else. People being injured is an instinctive human curiosity.

Forum statistics

Threads
104,306
Messages
1,005,430
Members
135,829
Latest member
LordPenguin666
Top