Game Development Reference
In-Depth Information
It is best to use a switch when you want to create a button/lever/switch in-game that is binary (that is to say, has
exactly two states). It is best to use a variable when you have a situation that cannot be covered with a simple on/
off state. For example, if you wanted to count how many goblins a player has defeated, you would have to store that
information in a variable. On the other hand, if someone gave your character a quest to slay five goblins, you could
have a switch flip to the “on” state after the fifth goblin is defeated.
While switch and variable theory is nice and all, let's take some time to apply it.
Objectives:
Add a button to the previously made map that creates an exit through which our intrepid hero
can reach another map. After all, if I were him, I wouldn't want to be cooped up in a single
13 × 17 map for eternity!
Create the exit itself.
So, how do we go about adding the necessary items to the map? We are finally going to start dabbling with the
functionality that gives RMVXA its reputation as a robust game-development engine that even a novice can use. If you
look directly below the Game item on the menu toolbar, you'll notice a trio of icons (they are to the left of the drawing
tool icons).
The first icon, which should have an orange square around it, if you haven't interacted with
these icons previously, is Map Mode. As the name suggests, having Map Mode selected allows
you to add/remove tiles on your currently selected map. You can press F5 to switch to Map
Mode at any time.
The second icon is the Event Editing Mode. (You can also press F6 to switch to that mode
without having to click the icon.) Events form a large part of RMVXA's stock functionality.
An event is an object that occupies a single square on an RMVXA map and carries out
processing for pretty much all essential game functions. For example, we can create a shop
run by a horse or a doorway that requires a key. Without events, you won't be able to do much,
if anything, at all. All nonplayer characters (NPCs) are events, for example.
The final icon is for Region Editing Mode. I will elaborate on what Regions do in RMVXA, once
it becomes relevant. (Teaser: It involves encounters with monsters). You can also press F7 to
switch to this mode without having to click the icon.
Click the Event Editing Mode icon (or press F6), and you'll notice that a grid appears on the map. If you right-click
any square of the grid, you'll see a menu pop up, as seen in Figure 2-1 .
 
Search WWH ::




Custom Search