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
Help with doors/events
RPG Maker MV Supportevery 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
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
(& its own Switches/Conditions & its own event-triggers ect)..
Use more than one event page and use switches to controll which eventpage is active
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
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.
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.
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.
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.
Original thread: https://forums.rpgmakerweb.com/threads/help-with-doors-events.130329/