Help with doors/events

TheRozman

Warper
Member
Joined
Nov 27, 2020
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
Am I able to use the same square to do two different events (think of a fence gate, I want to click on the gate from either side and be able to pass through to the opposite side) not sure on the coding, or even what to click on, I'm new to RPGM
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
677
Reaction score
348
First Language
German
Primarily Uses
RMMV
every event has eventpages, every eventpage can use its own IMG.
(& its own Switches/Conditions & its own event-triggers ect)..
Use more than one event page and use switches to controll which eventpage is active
Screenshot_1.png

I want to click on the gate from either side and be able to pass through to the opposite side

if you want to click on the gate with the mouse cursor than you will need a small script that can turn a switch by clicking on that event... the default event triggers are at the bottom left of the eventpage
 
Last edited:

Testtubebaby

Wizard of the woods
Veteran
Joined
Oct 31, 2020
Messages
45
Reaction score
23
First Language
English
Primarily Uses
RMVXA
You can make the same event perform multiple different functions, so yes, it is possible to do what you are asking.

The simplest way that I can think of is just to have conditional branches that check which direction the character is facing, and to react accordingly.

For instance, if the character is facing north, have the gate temporarily open, use a move event to pass the character through the now open gate, and then have the gate close again behind the character once the move has been completed.

Personally, I use RMVXA, so I'm not sure what differences the two systems have, but I'm fairly confident that your program will have all of the necessary calls to make this happen.

What this sort of event would look like is something like this:
- Conditional branch to check which direction the character is facing (make sure the event is set to activate on action button).
- Turn a switch on to tell the event to process accordingly (This can be any switch, just name it so you know which switch does what).
- Create a new event page in which the requirement to run is to have said switch turned on. (Make this page autorun or parallel process, I recommend autorun)
- Make sure the new page is set to either below characters or through is turned on (in the bottom left corner of the event settings), and that the new page doesn't have a graphic so it looks like the space is open.
- Make a move event that moves the player (x) tiles through the gate to the other side, where x is the number of spaces you need to move to get beyond the gate (set this to wait so that the event will only continue processing once the move action has been done).
- After the move event, turn off the switch that you turned on earlier so the event will go back to its original state on the first page. I recommend inserting sound effects where appropriate for when the gate is opening, and when the gate is closing.

Make sure you set up a page for each direction you are facing if you use this method. If you don't want to use switches and multiple pages for your event, you can also put everything onto one page using the same conditional branches that check which direction you are facing. You will just have to put in a few more things, such as changing the event graphic and toggling through on and off for each conditional branch.

If you need any more help, please feel free to ask. The people here are all willing to help.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,750
Reaction score
14,007
First Language
English
Primarily Uses
RMMV
For a fence gate, I'd just use a door quick event, and remove the transfer command, replacing it with an extra step to take the player to the other side, followed by another move route on the gate to close it again, changing directions in the opposite order of the 'open' move route. This is assuming you have animated versions of your gate for fully closed, fully opened, and 2 stages of opening in between.

If you turn on direction fix on the page, and have a DIRECTION FIX OFF at the beginning of the first move route, and DIRECTION FIX ON at the end of the second, you don't need 2 pages.
 

Latest Threads

Latest Profile Posts

Is this Profile Banner thing new? Or did I just discovered it now?
Well.. I was going to post my randomly generated road experiments... But the new "Attach Files" on profile posts seems to be quite buggy. Also there's no more option to insert Imgur images. Highly unfortunate. Guess I'll give them a bit to fix it and go back to messing with stuff.
my first day back to working on my project and i'm pooped!! hope to get back in the rhythm soon!

Forum statistics

Threads
107,593
Messages
1,030,811
Members
139,699
Latest member
danysanca
Top