Originally posted by the48thronin:
One of my maps is an ocean map. When the player is in this map, I have set a keydown event which takes the PC to another map of the deck of the ship, but I would like to have my game remember the position (X coord, Y coord, and Ocean set) of the boat on the map and when they hit they keydown to sail again, it teleports back to the ocean at the x and y coords they were at. any idea how to accomplish this?
In your teleportation event, before you move the player, insert 2 change global event objects to capture the player's X and Y coordinate(PlayerX/PlayerY). Then proceed to move the character.
When you wish to return him simply use the Map Position event object and supply the globals as tag values.
As for the "ocean set," you can also do this as a global but it is more intensive. Basically you use a global change event object to store the value of "&&LocationName;" into your ocean global. This saves the map name. To return the player to this map requires a big search event; its size is determined by how many possibilities there are. You will create a list of conditionals checking the value of your ocean global to see if they are the same name as the maps the player should be returned to. If they match then have the conditional call a teleport event object to send the player to that map. You only need to create conditionals to maps that are possible(ie, if you have an underground map which the player won't get to via this method, then you don't need to list it as a possibility).
(url="http://"http://stark.evula.net/pogwalkthrough.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://stark.evula.net/plugins/dev_tools.htm")PoG Dev Tools(/url) | (url="http://"http://stark.evula.net/plugins/spells_expander.htm")Spells Expander(/url)
(url="http://"http://stark.evula.net")Stark.evula.net(/url) | (url="http://"http://www.evula.net")EVula.net(/url) | (url="http://"http://mail.ambrosiasw.com/mailman/listinfo/coldstone_dev")Coldstone-dev mailing list(/url) | (url="http://"http://ucplugs.evula.net/pog.html")PoG Upcoming Plug-Ins Directory(/url)