Leridan's 'Transfer via World Map' Event
This feature will allow the player to open a world map in one of two ways: an item from the inventory, or by pressing a specific button. The latter option may be toggled on/off by a switch. When the map is displayed, the player can use a cursor to select a destination and the game will transfer the hero to that location.How it works:This feature is not plug-and-play ready
. If you do not understand how variables and conditional branches work, I suggest you brush up on those before attempting to use this event. The demo is for example purposes only; you can use the methods, but you will need to modify the code to fit your own world map image.
Now with that out of the way, let me explain how this works.
The map is structured in rows and indexes (or columns). In the demo example, there are three rows (0-2) and varying amounts of indexes within each row. This is important because there are two variables required by this event: [0001: map index] and [0002: map row] by default. These variables determine the position of the cursor on the map.
Pressing up on the keyboard decreases the map row
variable by 1. Pressing down increases
the map row variable by 1. The left and right arrow keys decrease and increase the map index
Pressing the enter/return key (or the accept button for controllers) will transfer the player to the selected map. This feature can be enabled and disabled by a switch. If the switch is turned on, the map is still viewable, but the transfer function is not accessible.
The cancel button closes the map.
Screenshots of the full code:
All necessary files are included in the download. The code has been commented to explain each part of the process.
This post has been edited by Leridan: Jun 7 2010, 07:51 PM