Gw Temp

Menu

Tutorial - 'Fork Conditions Tutorial' by Rusty

An item about RPGMaker 2000 posted on

Blurb

A tutorial on the usage of Fork Conditions (Basically If, Else statements in RPGMaker 2000)

Body

Download the example game -
http://www.gamingw.net/projects/rusty/downloads/fork.zip


Starting Note -


When lots of people first download RPG Maker 2000, the first thing they
try to do is make a
game. Please, to make your game as good as possible you should first make a
project called
"Test" or something, and just muck around with all the features of RPG Maker
2000 to get to know
what they can do. Before starting a game it is very useful to at least know
how to use switches,
variables and fork conditions. This tutorial is on Fork Conditions.



What is a Fork Condition? -


Really, fork conditions are very simple to use. All you really need to know
is what they are,
and what they do. Well, if you have ever done any programming (don't worry
if you haven,
most people haven't) a fork conditions is just an IF.. Then.. statement. If
you haven't done
programming, the easiest way to think of a Fork Condition is to think of it
as any sentence that
includes the words IF and WOULD.

For example..

IF you are hungry you WOULD eat.
IF you had money you WOULD visit the shops.

So fork conditions take place in everyday life. Basically, a fork condition
decides whether
something is true or not, and if it is true, it does an action. So in the
eating example, a
fork condition would first decide if you are hungry. IF you were, the fork
condition WOULD
then make you eat (eating is the action).

You might notice the Else case function, or Excepting case. Basically, this
is what happens if
the condition is not true.

For example...

IF you had money you WOULD go to the shops. Otherwise you would watch
television.

In this example, the fork condition first decides IF you have money. IF you
do have money, you
WOULD go to the shops, but if you didn't have money (the else case) you
WOULD watch television.



How to use Fork Conditions -


Well, on the 3rd page of Event Commands, the 4th option down is "Fork
Conditions...". Select
this. You should now see the following screen... screen1.jpg, had to change
.html document into .txt =) )


This screen is where you choose what you want the condition to be. There
are 10 different
Conditions, and there is an example of each in the example game (if you are
looking for the
Play BGM Once example in the example game, go to the Congratulations map.)
Here is a
description of what each of the 10 conditions does...

Switch -

Fairly simple. Can check to see whether a switch is ON or OFF.

Variable -

Can check to see if a variable is a certain value (same), equal to or
greater than (above),
equal to or less than (below), greater than (bigger), less than (smaller) a
value, or another
variable.

Timer -

Checks to see whether time is above or below a certain value.

Money -

Checks to see whether gold held is above or below a certain value.

Item -

Checks to see whether the party has an item, or checks to see if the party
doesn't have an item.

Hero -

Can check to see whether a certain hero is the the party, their name is
, they are
above a certain level, their HP is above a certain value, if they have a
special skill, if they
have something equipped, or if they are in a certain condition.

Event -

Checks to see what direction an event is facing.

Vehicle -

Checks to see if a certain vehicle is currently being ridden.

Started by decision key -

Checks to see whether the event was started by pressing space/enter.

Play BGM Once -

After the back ground music has played through once you can make something
happen.



All these are the conditions which RPG Maker 2000 can check to see if they
are true (or false),
and then do an action based on the result of the condition.

If you tick the 'Add Else Case' you can then choose an action to happen when
the condition is
NOT true.

For Example, if the event was not started by decision key.



Once you have selected the condition, and pressed okay, you should see
something like this...

<>FORK Optn:(condition)
<>
:END case

Or if you selected 'Add Else Case' this...

<>FORK Optn:(condition)
<>
:ELSE case
<>
:END case

Now that you have made your fork condition, the rest is just RPG Maker 2000
coding. Double
click on the <> sign between the 'FORK Optn:(condition)' and the 'END case'
to bring up the
list of Event Commands, and insert in the commands you want to happen if the
condition is true
(the action to happen if the condition is true). You can also double click
on the <> sign
between the 'ELSE case' and the 'END case' to choose the action which is to
happen if the
condition is not true.

So, in the following example...

<>FORK Optn: Money 10 abov
Show Message: You have enough money, take this potion!
Add item:potion
Change gold held:decrease:10
<>
:ELSE Case
Show Message: Sorry, you do not have enough money to buy a potion!
<>
:END case

RPG Maker 2000 will first decide IF the player has equal to or greater than
10 Gold Pieces.
IF the player does, they WOULD receive a potion, and would pay 10 GP for it.
IF the player
doesn't (else case) have 10 GP, they WOULD get told that they didn't have
enough money to
purchase the potion.


--------------------------------------------------------------------------------

I hope this tutorial and example game helps you to understand what a fork
condition is, and
how to use it!