Conditional Branch script: IF PLAYER IN MAP ID request

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
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.
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
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. :)  
 
Last edited by a moderator:

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
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!
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
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?
 
Last edited by a moderator:

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
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?
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
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?
 

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
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.
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
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. :)
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
Yes, erased events are triggered when the map is loaded again.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,551
Members
137,837
Latest member
Dabi
Top