Home > Tutorials > RPG Maker 2003 > Snowcrafts and Canoes
Snowcrafts and Canoes
If you haven't played Final fantasy 1 and 2, get them. I don't care whether you get the NES, Ps1, or GBA versions, get them. In FF 1 & 2 there were portable vehicles (a canoe in ff1 and a snowcraft in ff2) that let you traverse over special terrain. Today, we will learn how to make one.
In this tutorial you will:
Create a vehicle
Use a common event to determine the terrain the hero is walking on
WHAT YOU NEED
1 Common Event
1 Cool Vehicle Sprite
1. First, decide what terrain will be restricted. I am using snow in this case. Go to the Terrain Tab in the database and check the ID of the terrain. In the RTP
world chipset, it's number 6. Don't forget this number!
2. Now, create a common event. It needs to be a parralel Process. If you want, you can set a switch so it only under certain conditions. Now, take 3 of your
variables and name them [X], [y], and [map]. Under variable operations, assign them to X coordinate, y coordinate, and Map ID respectively.
After that, go to store terrain ID, which is under the second tab. Select your x y and map variables to locate the position. Assign the terrain ID to another
variable. I called mine [terrain].
Next, make a conditional branch if [terrain] = 6 (or whatever the ID of the blocked terrain is).
Make a new conditional branch inside this one checking if the switch [SnowCraft] is on.
If it's true, Change everyone in the party's sprite (or just the lead character if the order can't be changed) into the sprite of the vehicle.
If [SnowCraft] is turned off, then make a move event that rotates the hero 180 degrees and steps forward.
If the Terrain ID isn't 6, then change everyone in the party's sprites back to normal.
Here's the code:
<>Variable Oper:[0005:x2] Set, Hero X Coord.
<>Variable Oper:[0006:y2] Set, Hero Y Coord.
<>Variable Oper:[0007:map2] Set, Hero Map ID
<>Store Terrain ID: (V[0005, 0006]), [0004:TerrainBlocker]
<>Branch if Var[0004:TerrainBlocker] is 6
<>Branch if Switch [0002:SnowCraft] is ON
<>Change Sprite Association: Locke vehicle-6
<>Move Event: Hero, Turn 180, Move Forward
<>Proceed with Movement
<>Change Sprite Association: Locke hero4-3
Now try it out and be amazed.
You could repeat this process for multiple blocked terrains if you want. The terrain must be passable in the tileset options for this to work properly.
Snowcrafts and Canoes
Sun, 08 Jun 2008 19:39:08 -0700