Hello, I am wondering if there is any method to make a variable that stores the player's PREVIOUS X,Y coordinates from the time a switch is activated? I know you can have a parallel process running for player x,y location in a variable that activates an event when you are within the parameters of the event (for eventing things like Stealth), but if the page were to switch, does it store the last known data in the variable or is it cleared? If it is stored, can I have an NPC move to that location? How would I call the data from that variable to make an NPC move to that location?
Thanks for any help!
I think you would want to have your variables storing the players x and y inside a conditional statement checking if the switch is false. That way after the switch gets set to true it will no longer update the players x and y keeping the last stored values.
Edit: if I am understanding what you are wanting correctly.
Edit2: Also when switching pages if you have values stored in say game variables the switching of the pages will not change the values so it would still use the last values stored.
As for having an npc go to that location I cant think of an easy solution. Reason for this is you have to take into consideration passage settings and plotting a route from where it is to that location.
Awesome! 50% of my problem solved! Thank you very much for your help you two.
I am in fact using Theo Allen's Pathfinding script, which will move events to coordinates as defined by the player. However, I am now wondering to myself if there is a method to extract data from the variables with X,Y locations stored? Or does this need to go to script requests?
I think you should be able to refer to the variable directly using:
$gameVariables.value(index)
Where index = the number of the variable. So if you want to use it in a script call try sticking that directly into the script call where the x and y are supposed to go.