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)
Time-Based Events?
RPG Maker VXAce SupportYou 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.
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.
i dont understand
@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.
Original thread: https://forums.rpgmakerweb.com/threads/time-based-events.20599/