Conditional Branch script: IF PLAYER IN MAP ID request

Hello everyone, I have a map system under construction and I am in need for a Map ID function to work in the conditional branches..


Basically how my map system works is you access the map and it records your location ID coordinates- teleports you to a map room and when you have finished looking over the map it returns you to your recorded location.


What I have planned to add to the map is an event that is running on parallel trigger which in turn runs the conditional branch if those recorded location ID's could trigger a graphic to show on the map where you are currently located. The only problem is I cannot figure out how I can get the conditional branch command to recognize those map ID's- I figured the best solution is to have them check for a script.
control variable : game data : other :map ID will load the ID of the current map (the only map that exists, because maps are deleted from memory if the player leaves them) into the variable.


then check the content of that variable in the conditional branch next.
control variable : game data : other :map ID will load the ID of the current map (the only map that exists, because maps are deleted from memory if the player leaves them) into the variable.


then check the content of that variable in the conditional branch next.



What @Andar said. If for any reason you need to do something more complex, you can always set a variable with a certain value for each map, when you enter the map, inside a parallel procces.


For example for the first map you set it to be 1, for the second you set it to be 2 etc etc...


The same parallel proccess will then trigger a switch, that will be inside the conditions of a second event page, in order to turn the event to that blank event page so it will not keep running and load your cpu. Make sure that second page will not be parallel proccess. On your exit of that map, you set that switch to OFF again, so it can be reused! Of course this is too much work if you got 100 maps for example. But it is a workaround for more complex systems.


If you just need to do a few things, what @Andar told you is super sufficient. 🙂  
The above method is great, but just use erase event after setting the variable in a parallel process. Then, everytime a map is loaded the variable is set, the event deleted, and if you come back to the map later it will run again. No need for switches!
The above method is great, but just use erase event after setting the variable in a parallel process. Then, everytime a map is loaded the variable is set, the event deleted, and if you come back to the map later it will run again. No need for switches!

Is the event reconstructed after erasure if you reload the map?
Working hard on this and experimenting with the suggested ideas.


Does anyone know the best plugin that can allow me to attach pictures to map's coordinates rather than the screen?
Does anyone know the best plugin that can allow me to attach pictures to map's coordinates rather than the screen?

What do you want to do?


Do you want to show a picture that is binded to the map and not the moving camera by any chance?
Precisely, basically so I can put map keys without the use of an event displaying the graphic but rather use the picture command to go along with the map ID location I will be setting out.
Precisely, basically so I can put map keys without the use of an event displaying the graphic but rather use the picture command to go along with the map ID location I will be setting out.

You do probably need a picture lock plugin. Those are usually used in parallax mapping, but... why not!!! You should request one on script section, so there is the place to ask, making another thread. 🙂
Yes, erased events are triggered when the map is loaded again.
Yes, erased events are triggered when the map is loaded again.

Thank you for this information mate. This is actually very interesting.

Original thread: https://forums.rpgmakerweb.com/threads/conditional-branch-script-if-player-in-map-id-request.72607/