Memorize Location Script - Release 2 - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Archives (https://www.save-point.org/forum-105.html) +--- Forum: Creation Asylum Archives (https://www.save-point.org/forum-90.html) +---- Forum: Scripts & Code Snippets (https://www.save-point.org/forum-92.html) +----- Forum: RPG Maker XP Code (https://www.save-point.org/forum-93.html) +------ Forum: Code Snippets & Others/Misc (https://www.save-point.org/forum-100.html) +------ Thread: Memorize Location Script - Release 2 (/thread-6582.html) |
Memorize Location Script - Release 2 - Dubealex - 11-10-2004 Memorize Location Script - Release 2 Dubealex Nov 10 2004 This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss. No support is given. If you are the owner of the thread, please contact administration. Download the playable demo here: Memorize_Location_Script.exe (Size: 400.5 KB / Downloads: 3) NEW RELEASE #2 NOW AVAILABLE ! This is the first script I do alone, it's not an edit, I coded it entirely. So here's what it do: Basic Features: - Store the location of the player - Store the location of any events on the map - Store as many locations in memory as you want - Recall an event to a location (new in release 2) - A warp feature to teleport at specific location with script (new in release 2) What data does it stores ? -> Map ID -> Map Name -> X and Y coordinates on the map -> Screen X and Screen Y viewed on screen -> Facing Direction -> Terrain ID of the tile where the location is -> A keyname to name each location and refer to them -> A full name for use in your story line if you want it (optional). Extra features in the demo: - An "Exit Warp" item that allows you to exit from a maze, warping you at the entrance you took to enter the maze. - An item "Location Warp" used to memorize any location the player wants... It memorize the location where the player is when using the item; and when used again, the player is warped back at that location. (Aka like diablo.) - A Rock that you can pull, and if you exit the map and come back, it will stays where you left it. (New in release 2) Be sure to read the instructions on this post entirely. The scripts you need: PART 1/2: Adding the save/load lines in order to save the location you did when saving a game. Search for this line using the Search tool in the script editor in the class "Scene_Save": Code: Marshal.dump($game_system, file) This is the first line of a group of Marshal.dump lines; those that actually saves data in the save file. Under the last one, paste that new line for my script: Code: Marshal.dump($MemLocation, file) Then, go in the class "Scene_Load" and do the same trick, but search for the line: Code: $game_system = Marshal.load(file) This is once again the first line of a group of Marshal.load, that load data from the save files. So, once again, right under the last Marshal.load line, paste that one: Code: $MemLocation = Marshal.load(file) PART 2/2: Adding the new Memorize Location code in the script editor. All you need to do is add a new class before main named Memorize_Location. (Use "insert" or right click then "insert" to add a class.) And paste that code in it: Code: #=================================================== Instruction Manual |