Gw Temp


Tutorial - 'Variables and Forks' by Guest

An item about RPGMaker 2000 posted on


A newbies' tutorial that demonstrates the basics of Variables and Forks.


Hi People, this is a tutorial for n00bs. All you veterans who love patronizing beginners can leave now.OK.
This is for RM2k3 and 2k3...even XP

In this tutorial we will go through...
A.Variables and uses
C.Fork conditions/Conditional branches.

All a variable does is hold a number. (It can hold map locations but for now all you need to know is that it holds a number). It's what you can do with the number that makes a variable useful. Time for an example.
Picture a map of a town. You have a strange man blocking the door to a house. Hero#1 talks to him.
"Strange man: Hey Mr. Looks like you've found yourself in the wrong place. Now if you find my 5 shirt buttons(couldn't think of anything else) I'll let you live."
Just for argument's sake, our hero accepts. So off he goes in search of these buttons. Now for the technical bit.
You've just written the message for the srange guy in event commands, so now choose 'variable operation' call it ShirtButtons. choose 'set' and under operand put 0. OK.
The variable 'ShirtButtons' holds the Number 0.

Our hero has found himself in a dark forest of mystery! nice.
Oh look, here's a button!
(make event like treasure...2pages with switch)

The next 4 buttons would have the same commands.
Ok our hero, having found the 5 lost buttons of evil sets off to find the strange man so that he can leave the danger of the strange man ( I havn't quite thought out the story, but you get what I mean.Hopefully)

*Fork Codition/Conditional Branch*
A Fork Condition determines the path of execution of event commands depending on the meeting of certain critera.
... ...... No? Didn't get that? That's what the evil folk will tell you to discourage you from becoming their peer.
A Fork Condition is...
IF blah, THEN, bloo, ELSE, pah. You may be able to relate this to a school scenario.
IF you answer correct, THEN, teacher gives you praise, ELSE teacher gives you beating. With wood. Hard.

OK. Our strange guy has a Fork Condition above his message, the find my buttons one, remember.
OK now you will see the Conditional branch.handler
Under the Conditional brance handler put in a message like "Strange guy: Oh I love you! you found my buttons!"
Under ELSE is the first message and the set Variable ShirtButtons to 0.
Leave the END handler empty.

OK folks that's it for now. Hope you find this useful.