MZ A way to make buttons for an overworld map

Hi hi! So, I'm essentially wondering if there is a way to make events that are able to be "selected", and pressing the directional keys changes which event you are selecting, and pressing "z" / select runs a common event. (I guess an easier way to ask this is how to make something like Galv's map plugin, but on a map, and runs common events.) If there is any way to make the camera pan to it, that would be great, but Galv's camera plugin could probably do that for me. I'm trying to make a complex overworld system, but the only thing I'm having trouble with is how one would select an event in the first place. I got the rest covered. (I have some images if that helps, warning I just took the games art and kitbashed them together to get the point across)
Concept1.png

(Essentially a way for the player to select said "node" on the map, but only one they can access, and then just runs a common event. I can take over from there. I would like to not use the Mouse as I disabled touch controls)

Concept2.png


(Encounters exist but I can do that by having the common event run a move command and then just running the common event.)

Also, just a bonus question but not truly related to the question, is would anyone know how to essentially make the encounter send you to a map, and once you complete the map, you continue on your path? I could think of using the events after using the transfer command, but as far as I'm aware events don't carry between maps.

Anyways, if y'all know any scripts, plugins, or ways to do this through evening, that would be great!
If i was making this a core system for my game i would prolly design a plug in that just checked the coords for whatever event I put a note tag on. but here is a more beginner friendly version i think that's in the direction you are looking for.

Create a New Event for Each Node:
On your overworld map, create a new event for each node. These events will be used to represent the nodes on the map.
Set the Event Graphics:
In the Graphics section of the event page, select an appropriate graphic for the node.
Set the Event Trigger:
In the Trigger section of the event page, select Parallel. This will allow the event to run in the background while the player is selecting nodes.
Add a Control Variables Command:
In the Event Commands, add a Control Variables command and select a new variable. Name it something like "Selected Node". Set the operation to Set and the operand to the ID of the node event. This will set the "Selected Node" variable to the ID of the node when it is selected.
Step Two: create the selection system
Create a New Event:
On your overworld map, create a new event and name it "Selection System". This event will be used to control the node selection.
Set the Event Trigger:
In the Trigger section of the event page, select Parallel. This will allow the event to run in the background while the player is selecting nodes.
Add a Conditional Branch Command:
In the Event Commands, add a Conditional Branch command for each of your node events. Set the condition to Variable and select the "Selected Node" variable. Set the operation to Equal to and the operand to the ID of the node event. Under the branch, add a Show Picture command and select an appropriate picture to represent the selected node. This will display the selected node picture when the node is selected.
Add a Key Input Processing Command:
In the Event Commands, add a Key Input Processing command and select the Direction keys.This will allow the player to change the selected node by pressing the directional keys.
Add a Script Command:
In the Event Commands, add a Script command and enter the following code:

SceneManager._scene._spriteset._tilemap._scrollX = $gameMap.event($gameVariables.value(Selected Node)).screenX(); SceneManager._scene._spriteset._tilemap._scrollY = $gameMap.event($gameVariables.value(Selected Node)).screenY(); This will pan the camera to the selected node.

Add a Wait Command:
In the Event Commands, add a Wait command and set the wait time to a small value, like 1 frame. This will prevent the selection system from running too quickly and overwhelming the player.

Next: running the common events
Create a new event:
On your overworld map, create a new event and name it "Run Common Event". This event will be used to trigger the common event associated with the selected node.

Set the Event Trigger:
In the Trigger section of the event page, select Parallel. This will allow the event to run in the background while the player is selecting nodes.

Add a Conditional Branch Command:
In the Event Commands, add a Conditional Branch command for each of your node events. Set the condition to Variable and select the "Selected Node" variable. Set the operation to Equal to and the operand to the ID of the node event. Under the branch, add a Common Event command and select the common event associated with the node. This will run the common event when the node is selected.

The last thing to do is just add a wait command like before.
In the Event Commands, add a Wait command and set the wait time to a small value, like 1 frame. This will prevent the common events from running too quickly and overwhelming the player.
Maybe like have a parallel event check keypresses and when for example right is pressed, filter gameMap events (or a list of events the player has access to) whose x is bigger than gamePlayer x, then use the distance script to get the nearest event to the player, change its graphic to highlight it and then use map scroll script to scroll the map the separation between that event and gamePlayer x and y. Then store the event id and in the same parallel have it check for the z-key and then use the start script with that event id. (You could also make conditionals for all locations to check what happens with the key presses.)
Didn't quite get your second question, but I mean just stop the event where you transfer and when you return flip a self-switch and continue it on a different page. If you wanna use common events, run a different common event. Or maybe you can use jump to label at the very start and jump to different points of one common event depending on what value you've set a variable to.

Original thread: https://forums.rpgmakerweb.com/threads/a-way-to-make-buttons-for-an-overworld-map.179736/