Region ID check

● ARCHIVED · READ-ONLY
Started by Milena 7 posts View original ↗
  1. Is there a way or a script function that allows me to check which region id there is at every map. Say for example, my map 1 has Region IDs 1 and 2. Now, I want to determine all the parts of region id 1. 

    EAEOl3j.jpg

    So what I am aiming for is a way to check my map's region ids, and do something with it. Like, I want my region id 1 to be a healing ground, so when my character steps to all region 1 tagged part of the map, I recover my hp.
  2. You could do the healing ground idea without using a script. Create three variables - PlayerX, PlayerY, and RegionID. Set PlayerX equal to Game Data -> Character Player's Map X. Set PlayerY equal to Game Data -> Character Player's Map Y.

    Then, on page 3 of event commands, look for "Get Location Info." Under "Variable for Info," select your RegionID variable. Then for info type, do "Region ID." Under location, do "designation with variables," and make the Map X variable your PlayerX variable and your Map Y variable your PlayerY variable.

    Then, in a parallel process on the map, do a conditional branch: Variable RegionID is equal to 1 -> Change HP Entire Party +9999 (or however you want the healing to work). At the end of the event, add in a wait 5 frames or wait 10 frames or something.

    What this will do is track your player as he moves around the map and, if at any point he steps onto a tile that's been labeled as region 1, will recover health.

    The whole thing will look like this:

    v9LdUAN.png
  3. Zevia said:
    You could do the healing ground idea without using a script. Create three variables - PlayerX, PlayerY, and RegionID. Set PlayerX equal to Game Data -> Character Player's Map X. Set PlayerY equal to Game Data -> Character Player's Map Y.

    Then, on page 3 of event commands, look for "Get Location Info." Under "Variable for Info," select your RegionID variable. Then for info type, do "Region ID." Under location, do "designation with variables," and make the Map X variable your PlayerX variable and your Map Y variable your PlayerY variable.

    Then, in a parallel process on the map, do a conditional branch: Variable RegionID is equal to 1 -> Change HP Entire Party +9999 (or however you want the healing to work). At the end of the event, add in a wait 5 frames or wait 10 frames or something.

    What this will do is track your player as he moves around the map and, if at any point he steps onto a tile that's been labeled as region 1, will recover health.

    The whole thing will look like this:

    v9LdUAN.png
    Ahhh I never had that in mind, thanks a lot. Now I am wondering how to convert this event into a script :o
  4. The event above would continue healing even when the player isn't moving. Is that what you want? Or do you want them to heal a little bit every time they step onto a region 1 tile (and then not again until they take another step)?


    The script linked by Andar will do that for you.
  5. This is helpful, thanks! I will be using it on my project :D
  6. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.