complex world map event(Solved)

Ok so im making the world map(the one that you go to when moving from location to location NOT the item that says your location) and what i want to do is. when you leave a location i want it to pop up a box that says where do you want to travel to then it give you a few locations and when the player selects a location it auto walks the player to that location, i only want the locations to pop up that the player can actually walk to like this

Green  [ ] = Places you CAN go

Red     [ ] = places you CANT go

WorldMap.png

I want it to where the player can only walk to the closest areas. i dont want the player to be able to just walk over a town to get to a cave or past a tower to get to the lake. i want it to take the player to the next area so that the player has to go through that area then out the other exit to get to the other side of the map.

Now im guessing its gonna need to use player coordinates to say "ok, the player just came out of this town so the only places they can go is here and here" or somethin like that. but i have no clue on how to set it up. Any help would be much appreciated.
Well, you can either use coordinates then lots of if-then-elses.... or you can also set a variable before you leave a map, then lots of if-then-elses too... or make a player-touch event on the place where your character will be when he leaves a map so that you can make the choices specific to that map only, and no need for if-then-elses...

or add the choices to the last part of the event that makes you leave a map...
I think Tsukihime has a conditional choices script where you can enter all the choices, but add conditions to each one, so they'll only be shown if that condition is true.


For making the player walk automatically, you'd need a pathfinding script. There's one in the mouse system I posted recently - you'd need the CharacterBase and Player parts of that script, but you'd have to remove the references to the mouse in the Game_Player.move_by_input method (in fact, you should just be able to comment out that whole method and the alias and just use the original).
I think Tsukihime has a conditional choices script where you can enter all the choices, but add conditions to each one, so they'll only be shown if that condition is true.

For making the player walk automatically, you'd need a pathfinding script. There's one in the mouse system I posted recently - you'd need the CharacterBase and Player parts of that script, but you'd have to remove the references to the mouse in the Game_Player.move_by_input method (in fact, you should just be able to comment out that whole method and the alias and just use the original).
Is this the one your talking about? 

http://himeworks.wordpress.com/2013/03/06/choice-options/
Yes, that's the one.
but how exactly am i going to set up the Player coordinates?
What do you mean? You detect (via Control Variables) where the player is currently standing, and then you use lots of conditional branches to determine where they're allowed to go based on where they already are. Nobody can do this for you - you're the one who has the world map and knows where the player can go from each point.
or to make it simple, follow my last suggestion... make the choices in the same event that makes you leave a map so that you don't need conditionals...
Depending on how you structure that map, there might be another, easier solution without the need for variables.


You can place an event below player and on player touch at the paths leading to or from transfer points.


That event can then use show choice and moveroute commands to move the player to the desired target.


If you have an open world map, that would require you to surround transfer points with such events - on a large map that can cause a lot of lag.


If your world map is limited to a few paths (like the one in your example picture), you'll need only one such event for the end of each path.


It's even possible to combine transfer- and move control-events if you don't want the player to stop on the map after selecting a destination.


This way you don't need pathfinding scripts or coordinate checks for your player.
I solved it another way. ty for all the help. 
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.

Original thread: https://forums.rpgmakerweb.com/threads/complex-world-map-event-solved.17891/