Game Development Reference
In-Depth Information
The Exit Item/Skill
Envision this scenario: The player has gotten through a particularly long dungeon and defeated the boss at the end.
His/Her resources were sorely diminished, and he/she needs to get back to town. Most role-playing games (RPGs)
include a skill that automatically returns the player to the entrance to the dungeon, thereby bypassing the trip back.
To create an item or skill that will allow the player to exit a dungeon automatically, we'll need the following:
A common event that checks to see which dungeon the player is currently in. If the player is
not inside a dungeon, the event will return an error message. (You can also make it so that you
can't escape from certain dungeons.)
We have to update the world map's transfer event, so that it writes the dungeon location to a
variable.
We have to update our dungeons' relevant transfer events, so that, in the case of the player
exiting to the world map manually, the dungeon location variable is set to its default value.
Last, we must actually create the item or skill that will hold this event.
Updating Our Transfer Events
First of all, we currently have two dungeons. (Given that the subquest well is right in town, let's not count it for the
sake of this exercise.) The dungeon where the player finds Gemini will be 1, and the tower will be 2. I'm going to call
the variable in question DungeonLocation , for the sake of clarity. In the world map's transfer events, you'll want to find
the two that lead to our dungeons and insert the appropriate Control Variable command, like so:
@>Conditional Branch: Variable [0002:X] == 28
@>Conditional Branch: Variable [0003:Y] == 82
@>Control Variables: [0011:DungeonLocation] = 1
@>Transfer Player:[005:Goblin CaveF1F] (020,043), Up
@>
: Branch End
@>
: Branch End
@>Conditional Branch: Variable [0002:X] == 13
@>Conditional Branch: Variable [0003:Y] == 76
@>Control Variables: [0011:DungeonLocation] = 2
@>Transfer Player:[007:Tower of the VoidF1F] (025,049), Up
@>
: Branch End
@>
Then, in both of the dungeons, we find the transfer event that leads the player to the world map and have
DungeonLocation set itself to 0 in those.
Creating the Exit Scroll
Next, let's create the item that will call the common event we want to make. Take a look at Figure 9-2 for details.
 
Search WWH ::




Custom Search