Help - Search - Members - Calendar
Full Version: [Beginners]Understanding Switches and Variables
RPG RPG Revolution Forums > Game Engines > RPG Maker 2000 / 2003 > RPG Maker 2000 / 2003 Tutorials
Freedom
Understanding Switches and Variables
Freedom's/Greyhound's Version


Note:We all know that there' a tutorial like this but I wanna make my own tutorial.

Now I see some beginners having problem with switches and variables.So I thought of making a tutorial.
Now before we begin using them we must first understand them by knowing there function and meaning.
Also we will encouter the Conditional Branch or the Fork(For RM2K and RM2K3)

Switches
The classification of switches.

Switch-A boolean which can be set for On/True or Off/False.You can allready get what they mean but adding logic and basic understanding.

Self Switch(For RMXP/RMVX)-Now this also works like a normal switch but this switch is temporary and only works inside an event.This is commonly used for chests.

Now after switches we will discuss variables.

Variables-If you remember this being taught by your algebra teacher you'll know allready how it works.Now variables in algebra correspond or represent a number.Now like variables this also represents its own value.Variables can be set,divided,subtracted,added,multiplied and etc.Variables can correspond also to money and other things.
Example:Note the one surrounded in double quotes are variables.
CODE
set "a" value to 10
decrease "a" value by 1

This is just the examples but you can do more.

Conditional Branches or Forks
Now in RM2k and RM2k3 we will see Forks while in RMXP and RMVX Conditional Branches well there functions are the same.Now the only thing is Conditional Branches have more options added(Correct me If I'm wrong).Anyways we will visualize a conditional branch as a option type or something required and also we can add a special function.Now sometimes we will use this function.This is called the "else" function(My own definition and terms).Now I can't say it in words but I can give an example.
CODE
if switch001 is true
show text:hahaha
else
show text:boohohoo

Now in the coded example above you will see a conditional branch.The conditional branch as an else function.Now you will see the "if" word.Now we all know the meaning of "if".Now in the statement if switch001 is true/On it will show a message "hahaha".Now if switch001 is not true it will instead use the else function and show boohohoo.
Now in the conditional branch you have multiple options.

Well that's all.Any comments.Any suggestions on how to make this tutorial much better and easier to understand.
Note:If you say post screenshots.well I can't sorry.But I'll try.
Protoman5801
Good job! I read this not expecting to get anything out of it but I actually learned alot. biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.