Instead of town maps, my game will have the player enter houses and other areas directly from the world map, like in Chrono Trigger. I want an event that displays the name of the area when the player is next it, but the name disappears when the player walks away.
The only way I can figure out to do this is by surrounding the entrance event with events that erase the image... which is fine I guess, but I feel like there must be a more elegant way to do this without cluttering the map with so many events for each entrance.
You could do it with a single parallel process event tucked in the corner. Just have it comparing player coordinates against the coordinates of each location that can be entered.
Or you could try even proximity icons script. It sounds like its the same as what you want, just look for it here in the scripts database.
Quote from: ForeverZer0 on March 02, 2012, 10:46:01 pm
You could do it with a single parallel process event tucked in the corner. Just have it comparing player coordinates against the coordinates of each location that can be entered.
This is the only method I know how to do it.
Create a Parallel Common Event that runs from the start of the Game that constantly records the Player's Map X and Map Y etc, etc.
Create a Autorun Event that records the Event's X and Y, or you type it in, and then erases itself (Command [Erase Event])
Create a Parallel Event that runs in the background of a map that has a conditional branch of Player's X = Event's X?
Within the Player's X = Event's X Conditional, create another Conditional of Player's Y = Event's Y? (Or Vice Versa, does not matter)
Within the "If True" space of the second comparison recorded, in my instruction, the Player's Y = Event's Y?, you can add the command
"Show Picture" and insert the Picture.
Within the "Else" space of both Conditional Branches, add the command "Erase Picture" removing the # of the Picture Shown
Eg. Show Picture #17 "Living Room", Erase Picture [#17]
Make sure the Autorun Event ends with an [Erase Event] and not a [Self Switch] so that it runs again every time you enter the map
It's recommended you set the Transfer Player Event as Action Button if you're standing directly over it
If not and you're using a Player Touch function, you'll need to manually set X and Y instead of setting it to the Event's
Not very hard, it's best to keep the Picture's # the same, because they should not show up at the same time.
If you need a picture, tell me and I'll be able to upload it.
Easier version (that works without stopping the player, because auto run stops the player from being able to move on their own) below:
All you need is a single parallel process that checks if players X and Y equal desired locations X and Y (player's X and Y equal events position) then show picture, else erase picture