Gw Temp

Menu

Tutorial - 'Flying Charas' by siba

An item about RPGMaker 2000 posted on

Blurb

siba shows you how to make your characters fly.

Body

Flying Charas
by: Siba


In this tut I will show you how to make characters fly by simply pressing a button with one common event, two switches, and four variables. Theres a few ways of going about this, one, To change the sprite of your air ship to your character in a flying position, and two, Changing your characters sprite into a flying position. This poses a problem if you want the cool "lifting into the air" effect you get with the airship. Now the "changing hero sprite" probably wont work considering you cant fly over objects, unless you then change all the tiles passablity and what not.

================================
1. Common Event
================================

Go into the database and select the common events tab. Find a blank one and lets get going.

*Name it something like "Flying" or something that you like.

* Make the Trigger "Paralell Process", so that this works from the start of the game.
[You can change this to autostart, in the case that you want them to have to learn an ability first. Then at the time they learn the ability or whatever, place the switch that you use in there.]

Now we can start on the commands, I will explain everything out thoroughly and to the point. First, we make a switch operations. Name them something like "Flying 1" and "Flying 2", but only use "Flying 1". This will turn on the conditional branch were using now. So now make a conditional branch located on page 3 in the commands. Make the condition, Flying 1 is on. Then uncheck the execute custom handler at the bottom left. [REST OF TUT COMMANDS SHOULD FOLLOW UNDER THIS BRANCH UNTIL NEXT CONDITIONAL BRANCH.]

Now we write what happens when the condition is met. Insert the command 'Key Input Processing'. This should be on the 3rd page also. Now we can use the first of our four variables. In the 'Store Key Code In' place, find a blank spot and name it something like "Flying On", yet again. Select it. Now uncheck everything excet for "Desicion Key (5)" and "Wait Until Key Pressed", and hit ok. Next, Insert the command found on page 2 called 'Memorize Position'. This is where we will use the next three of our four variables. Find three blank spots in your variable list, probably right under "Flying On" or whatever you named it. Name one something like "Map ID" and the second something like "X Coordinate", and the third something like "Y Coordinate". Now on the 'Memorize Position screen, choose to store the obvious ones in the spots, "Map ID" in the obvious, "Map ID", ect...

================================
2. Graphics
================================

Now to Change the vehicle graphic to your characters body so it appears as if your character is flying. Insert the command 'Change Vehicle Graphic' found on page 1. Find your Characters sprite and click ok. (This is probably the easiest so far eh?) Now insert the command found on page 2 called 'Set Vehicle Start Position '. Select the three variables you just made prior, "Map ID", "X Coordinate", and "Y Coordinate", that memorized the position thats going to set where your vehicle starts. After your done with this, click on ok. Now Insert a command found on page 2, called 'Enter or Exit Vehicle', (it should auto put it on enter). Next insert a the second switch that we made earlier, called "Flying 2" or whatever you chose to name it. This will Turn on landing.

================================
3. Landing
================================

Now as for landing, Lets make another conditional brach that uses the switch "Flying 2" instead of "Flyin 1" as the condition. [REST OF COMMANDS IN THIS TUT WILL FOLLOW UNDER THIS BRANCH.] Now, Insert another 'Key Input Processing" into the batch, uncheck everything exept "Decision Key (5)" and "Wait Until Key Pressed".

Now, the one thing out of your way from programming. Making an invisable sprite. This will change the vehicle invisable after landing, instead of now having two of your main character. Create an invisable or blank character, and then add another 'Change Vehicle Graphic' to the commands and make it the invisable chara you just made. This should do it for the taking off and landing.

================================
4. Coding
================================

This is what it should look like in your common events varying from what character you chose and what number you stored variables and switches in:

<>Switch Operation: [0001: Flying 1] ON
<>Branch if Switch [0001: Flying 1] is ON
<>Key Input Proc: [0002: Flying]
<>Memorize Location: [0003], [0004], [0005]
<>Change Vehicle Graphic: Airship char2-4
<>Set Vehicle Loaction: V[0003] (V[0004],V[0005])
<>Enter Vehicle
<>Switch Operation: [0002: Flying 2] ON
<>Branch if Switch [0003: Flying 2] is ON
<>Key Input Proc: [0002: Flying]
<>Change Vehicle Graphic: Airship chara-2-3
<>
:End
<>
:End
<>