Unlimited Airships
This tutorial will describe how to have an unlimited number of airhips in your adventure simultaneously. It assumes you have working knowledge of switches, events, and vehicles. As of this time, I have only got them working on a single map, but since my adventure requires that some of them be able to traverse maps, I'll have to develop that part soon. I'll update this tutorial when I figure that part out. For now, however, I'll show you how to put 3 airships on your map, each of which can be flown and landed at will, each with its own music, graphics, and flying/landing rules.
First, I wish to give credit where it is due. Two of the ideas which made this tutorial possible came from other sources. The code that allows the program to know where you landed your airship came from Don's Adventures, and the idea of switching chipsets when you board the vehicle came from Norwolf's FAQ on how to create more than 3 vehicles.
There are a few things you need to create for each airship you wish to have. First, you need an event on the map to represent the airship on the ground. You also need two switches, one of which is used to note that the airship is currently being flown, the other to determine if the vehicle is available in the game. You will need 3 variables to store the vehicle's resting place: Map, X, and Y location. Last, you will need a common event that will handle the landing of the airship. Here are the steps. Do this entire sequence for each airship you wish to have.
Name the airship. I'll call mine the "Falcon".
Create 2 switches. Name them "Flying Falcon", and "Falcon Visible"
Create 3 variables. Name them "Falcon Map", "Falcon X", and "Falcon Y"
Create a chipset. Name it "Falcon Overworld". Set up the various terrain to allow passage/landing as desired.
Create the event on your map. Call it "Falcon". Check the event condition "Switch" and set it to "Falcon Visible". Set its graphic to your airship as it looks on the ground. Set it to "Push Key" and "Below Hero". Animate it if you like. Set the event commands as follows:
<>Change System BGM: Airshp->yourmusic Set **If you have different music**
<>Change Switch: [####:Falcon Visible]-OFF Set
<>Change Vehicle Graphic: airshp->yourpic-1 Set
<>Setup Vehicle Place: Airshp, V[Falcon Map] (V[Falcon X],V[Falcon Y])
<>Ride Vehicl:
<>Change ChipSet: Falcon Overworld
<>Change Switch:[####:Flying Falcon]-ON Set
Create the common event in the DataBase. Call it "Falcon Landing". Set Start Condition to "Parallel Process" and Appearance Conditions Switch to "Flying Falcon". Set the event commands as follow:
FORK Optn:Airshp Riding
<>
:ELSE Case
<>Memory Place: [Falcon Map],[Falcon X],[Falcon Y]
<>Setup Event's Place: Falcon,(V[Falcon X],V[Falcon Y])
<>Change Switch: [####:Falcon Visible]-ON Set
<>Setup Vehicle Place: Airshp, ####:Map Name (000,000) **This is a map/position that cannot be accessed or seen. It is the temporary storage spot for the airship until needed again.**
<>Change Switch: [####: Flying Falcon]-OFF Set
<>Change ChipSet: Overworld **your normal walking around chipset**
<>
:END Case
<>Wait: 0.1s
And there you have it! Do this for each airship you wish to have. If you decide to make another, simply do the steps again for that airship. Using this method, I have 5 "airships" in my game at present, all on the screen at once, and all of them work repeatedly in any order.
As I mentioned above, this code does not allow the airships to be on more than one map. However, since my game will require 3 of my airships to be able to move from one map to another, I will have to come up with a way to handle this. One thing I know about it is that the Common Events will ONLY work if the Events they refer to have the SAME EVENT ID NUMBER in each map. Plan accordingly.
Credits for sample elements:
The sample that I have included was mostly done by me. However, there are a few MIDI files included that I did not make on my own. They were all downloaded from RPGamer, which used to be known as the UnOfficial Squaresoft Website. I'm not sure who created them, and I can't seem to get through to the website anymore. Just know that I didn't make them.
To download the sample, click here.
chpicker