Quote
Originally posted by BryceCubed:
Stark, I was wondering how you pulled off the memory spells in Spells Expander. I seem to have problems duplicating it for my game.
Mark and Recall...
The mark spell has a set of globals, one of which is set to 1 when a spell is stored into memory, 0 when it is free. When cast it looks for the open slot and then saves the following information into the global slots: player coordinates, map player is on, and the player's description for the area(which he enters). Mark does this for each of the 3 memory slots.
Recall is more complicated. There is a header event which looks for the memory slot being recalled and then copying the data into a temporary global, then clearing the memory slots globals(as you can only recall to a location once, and then that slot is cleared). Then the header event sends you to the main event which looks at the temporary global values and first checks the map variable against every possible area name in the game(approximately 200 conditional checks). Once one is found it teleports the player to that area. If that area is not found then an error message comes up(if you create a plug-in with a new area and SE is not updated for it, you will get this error message if you mark and then attempt to recall to that area). After you are teleported it sets your coordinates according to the player coordinates globals.
Erase Memory and Query are fairly simple. They just figure out which memory slot you are using, and then either spitting out the global information or clearing the globals for that slot.
Quote
(2nd parenthetical statement: there is a glitch with Recall in SE, where the spell places you at tile (1,1) instead of the place where you cast Mark)
Which version of PoG are you using? If you aren't on 1.0.2 then you need to upgrade for the teleportation spells to work.
Does this happen all the time? In a specific area?
------------------
(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)