Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> [Beginners]Understanding Switches and Variables, And knowing how to use them
Freedom
post May 21 2008, 06:51 AM
Post #1


おねがいします! ぼくの なまえ わ じう
Group Icon

Group: Revolutionary
Posts: 520
Type: Mapper
RM Skill: Undisclosed




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.


__________________________




[Show/Hide] RRR Guest Map


Guest Map Link - Guest Map

Guest Map made by Santabla



[Show/Hide] Signature


[Show/Hide] Welcoming Committee


RRR Welcoming Committee

Speed@
CJ7Edition
Kyle1234lee
Freedom

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

A memory from what was the good past... Haha...







Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies
Protoman5801
post Jun 10 2008, 03:51 PM
Post #2


Level 3
Group Icon

Group: Member
Posts: 33
Type: None
RM Skill: Undisclosed




Good job! I read this not expecting to get anything out of it but I actually learned alot. biggrin.gif


__________________________
[Show/Hide] Cool thingy I made


[Show/Hide] Can you read this?
Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.



Signature made by me with GIMP
Go to the top of the page
 
+Quote Post
   

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 09:29 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker