This tutorial will teach you how to create a "quick travel" or "teleport" scene purely using events. The locations the player is able to quick travel to only become available once they discover them, and are listed in the order they are discovered. This tutorial was created as part of the RMDev Challenge #1.
A demo can be downloaded here (RTP not included).
The final result should look something like this:
Pressing Q and W scrolls through discovered towns, and selecting the highlighted town teleports the player to that location. This tutorial is split into multiple sections which all work together. An event is required in each town, as well as one at the teleporter, and three common events are required. Also, you will require a basic understanding of switches and variables to understand this tutorial.
So, without further ado, let's get into it!
Town Events:
This event will run as soon as the player enters a town and will record that the player has entered the town (note that town events in the demo are located in the upper-left hand corner of each town). For example, let's say the player enters town A; the event should look like this:
Now, straight away, we see some switches and variables that need to be defined.
X (variable) is used to keep track of how many towns the player has discovered. Each time the player discovers a new location, it should be increased by one.
Town A (variable) is used to show in what order Town A was discovered. Every town requires a variable such as this. By setting this value to X the game can determine how many locations the player had visited before visiting Town A (Hence, it is important to increase X by 1, only after setting the town's variable to X.
Discovered A (switch) records that Town A has been discovered. Every town requires a switch such as this.
This first page should be set to Autorun, with a second, blank, page activating after switch Discovered A is on.
Teleporter Event
This is the event that activated the location selection. It may look daunting at first, but is actually quite simple:
However, if a town is discovered, the event sets up for some common events (which will be explained later). However, the biggest task this event carries out is setting up the names of the towns that have been discovered. See in the first screenshot how there are town names on the left hand side? This event is what displays them. Each town's name is a picture which is displayed. The X coordinate for each picture is 5, and the Y coordinate is calculated based on the order they are discovered. This allows the names to be listed in the order they are discovered.
The exact Y and X coordinates are completely optional. To calculate the Y coordinate, I incorporated the town's variable in the calculation. If a town is discovered second, it's variable would equal 1, if it was discovered fifth, it would equal 4, etc. hence, by multiplying the town's name's picture's Y coordinate by its respective variable, it will be displayed further down the screen than subsequent towns.
The final thing this event does is activate the common event: Select Map Location.
Select Map Location Common Event
This is event determines which location is currently highlighted:
The first thing this event does is disable the player's access to the menu. As this is kind of creating a new menu, it would be weird for the player to be able to access the pause menu as well. Also, it makes the B button available (which is the default "exit menu" button). At the end of the event, it can be seen that the player can escape the location selection scene by pressing the B button, and the button's normal function is then restored.
I believe my comments explain the rest event in adequate detail. Basically, the event gives the function to the Q and W buttons to scroll through available locations. The MapBackground picture is the black and brown circle in the first screenshot (excluding the map on it, that is a separate picture).
Map Selection (variable) was mentioned earlier on.This variable is used by the common event: Show Map Location. It is initially at 0 (as shown in the Teleporter event). It increases by 1 every time W is pressed and decreases by 1 each time Q is pressed.
Show Map Location Common Event
This common event is called at the beginning of the Select Map Location common event. This event simple shows a picture based on Map Selection is currently equal to:
As mentioned before, each town is given a number when it is discovered. If this number is equal to the Map Selection variable, then it will be highlighted, otherwise it is un-highlighted.
Go To Map Location Common Event
This common event activates if the player presses Z or Spacebar in the Map Selection scene and is the final step in the process. This event begins by stopping the Select Map Location common event and erases all of the pictures associated with the map selection:
Then once everything is "put away", it transfers the player to the location that is currently highlighted. Finally, normal use of the B button is restored so the player can once again access the pause menu.
And so concludes this tutorial! You are now one step closer to eventing your own, sleek, quick travel system! Good Luck!
A demo can be downloaded here (RTP not included).
A demo can be downloaded here (RTP not included).
The final result should look something like this:
(note that the layout is completely customisable! Import your own pictures to give it a personalised appearance!)
Pressing Q and W scrolls through discovered towns, and selecting the highlighted town teleports the player to that location. This tutorial is split into multiple sections which all work together. An event is required in each town, as well as one at the teleporter, and three common events are required. Also, you will require a basic understanding of switches and variables to understand this tutorial.
So, without further ado, let's get into it!
Town Events:
This event will run as soon as the player enters a town and will record that the player has entered the town (note that town events in the demo are located in the upper-left hand corner of each town). For example, let's say the player enters town A; the event should look like this:
X (variable) is used to keep track of how many towns the player has discovered. Each time the player discovers a new location, it should be increased by one.
Town A (variable) is used to show in what order Town A was discovered. Every town requires a variable such as this. By setting this value to X the game can determine how many locations the player had visited before visiting Town A (Hence, it is important to increase X by 1, only after setting the town's variable to X.
Discovered A (switch) records that Town A has been discovered. Every town requires a switch such as this.
This first page should be set to Autorun, with a second, blank, page activating after switch Discovered A is on.
Teleporter Event
This is the event that activated the location selection. It may look daunting at first, but is actually quite simple:
The first thing the event does is check to see if any towns have been discovered. As X is the number of towns that have been discovered, if X equals 0, then no towns have been discovered. A simple message is displayed to signify this. The Map Selection variable will be discussed later.However, if a town is discovered, the event sets up for some common events (which will be explained later). However, the biggest task this event carries out is setting up the names of the towns that have been discovered. See in the first screenshot how there are town names on the left hand side? This event is what displays them. Each town's name is a picture which is displayed. The X coordinate for each picture is 5, and the Y coordinate is calculated based on the order they are discovered. This allows the names to be listed in the order they are discovered.
The exact Y and X coordinates are completely optional. To calculate the Y coordinate, I incorporated the town's variable in the calculation. If a town is discovered second, it's variable would equal 1, if it was discovered fifth, it would equal 4, etc. hence, by multiplying the town's name's picture's Y coordinate by its respective variable, it will be displayed further down the screen than subsequent towns.
The final thing this event does is activate the common event: Select Map Location.
Select Map Location Common Event
This is event determines which location is currently highlighted:
I believe my comments explain the rest event in adequate detail. Basically, the event gives the function to the Q and W buttons to scroll through available locations. The MapBackground picture is the black and brown circle in the first screenshot (excluding the map on it, that is a separate picture).
Map Selection (variable) was mentioned earlier on.This variable is used by the common event: Show Map Location. It is initially at 0 (as shown in the Teleporter event). It increases by 1 every time W is pressed and decreases by 1 each time Q is pressed.
Show Map Location Common Event
This common event is called at the beginning of the Select Map Location common event. This event simple shows a picture based on Map Selection is currently equal to:
Now, this event may look large, but is actually just the exact same process repeated each time (once for each town). What the event does is, firstly, checks to see if a town has been discovered yet. If not, it moves on. If it has, then it checks to see if the town is currently highlighted by the Select Map Location common event.As mentioned before, each town is given a number when it is discovered. If this number is equal to the Map Selection variable, then it will be highlighted, otherwise it is un-highlighted.
Go To Map Location Common Event
This common event activates if the player presses Z or Spacebar in the Map Selection scene and is the final step in the process. This event begins by stopping the Select Map Location common event and erases all of the pictures associated with the map selection:
And so concludes this tutorial! You are now one step closer to eventing your own, sleek, quick travel system! Good Luck!
A demo can be downloaded here (RTP not included).
Last edited by a moderator:
