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,575
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,551
Reaction score
4,560
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 Profile Posts

Ami
--- Overused ---

Hero: (Drink 3 HP Bottle L)
F.Healer: Don't drink too much,or you got sick!
Hero: Nah,i'm okay. it's the way to repleni---
(Hero Collapse)
Hero: (Weak) Ugh...my head (Coughing Then Vomiting)
F.Healer: I told you to don't Drink 3 HP Bottle L or you're Sick. Let's go to Doctor.
Shaking off the dust. Clearing the cobwebs. Time to get back to gam-mak!
I should have looked for this earlier....

It makes MV only need OGG files, and it fixes the audio lag issue. :LZSexcite:
Battle of the original characters! my main character for my game vs. my friend's main character of his comic...
A video game has a brand attached to it.
No offence meant, but it is disadvantageous to use the default RM graphics due to the fact that they can correlate your game strongly to other RM games and whatever associations a user has with those unrelated games.

Forum statistics

Threads
103,212
Messages
998,029
Members
134,687
Latest member
pen
Top