Eventing a Dynamic Map Selection

Petite Elite

Veteran
Veteran
Joined
Jan 1, 2013
Messages
128
Reaction score
91
First Language
English
Primarily Uses
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:

(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:

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 the game can determine how many locations the player had visited before visiting Town A (Hence, it is important to increase 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 is the number of towns that have been discovered, if 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:

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:

 ​
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:

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). 
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
This looks like a very nice system.  One thing I was a bit confused about, as a player.  Suppose I interact with the teleporter and then change my mind about using it, how do I get out of it?  Esc doesn't work, and I couldn't find any key to use which would do that.
 

Petite Elite

Veteran
Veteran
Joined
Jan 1, 2013
Messages
128
Reaction score
91
First Language
English
Primarily Uses
This looks like a very nice system.  One thing I was a bit confused about, as a player.  Suppose I interact with the teleporter and then change my mind about using it, how do I get out of it?  Esc doesn't work, and I couldn't find any key to use which would do that.
Oh, wow, completely slipped my mind :p

I think just adding a conditional branch to the end of the Select Map Location common event that checks whether B button is being pressed should work. Set it to turn off the map selector switch and erase pics 1-5.

I'll edit the OP and upload a new demo, thanks for the heads up :p
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top