Welcome to Gaia! ::

Rpg Maker Games.

Back to Guilds

Share your RPG Maker games! Make contests, and make friends. 

Tags: maker, games, contests, awesome, construction 

Reply Game Making Tips and Tricks
Guide to Switches and Variables

Quick Reply

Enter both words below, separated by a space:

Can't read the text? Click here

Submit

Ragniirok

8,150 Points
  • Elocutionist 200
  • Citizen 200
  • Forum Sophomore 300
PostPosted: Sat May 07, 2011 8:09 pm


GUIDE TO SWITCHES AND VARIABLES PART I
BY RAGNYROK


Introduction
Hello, and thanks for showing an interest in reading my tutorial on how to utilize switches and variables in the RPG Maker Series. I think of switches and variables as bare necessities when using the event editors in the maker series. And, so I have taken it upon myself to write out a tutorial in case any guests or members aren’t too clear on how they work. This is a short and simple tutorial. I write this assuming the reader/s have a small understanding of the options on an event page.

~~~~~~~~~~~~~~~~~~~~
Scenario
Let’s say you want an NPC on one of your maps to say two different things at two different parts of your game. In order to do this, you will need to use a switch. First, we will start of using just one switch.

Your Hero walks up to an NPC and speaks with him. The NPC asks you to perform a task for him. When the conversation is over and the NPC asks your Hero to perform the task, the NPC says something different the next time you talk to him.

~~~~~~~~~~~~~~~~~~~~
The How To
Let’s create an Event for this Scenario. Name it NPC.
In this event, you will need 2 pages.
Their starting conditions should both be when a button is pushed.
And, their layer should be the same as the character.
You should also set a graphic for the NPC event.

Next, let’s go ahead and create our switch.
On the 2nd page of NPC, click on the first checkbox underneath the name of the event.
When you click on the checkbox, it will open up another option.
Bring up that menu to choose a switch. You may name it whatever you like.

Basically, what you have just done is told the NPC event that…
If the switch is turned off, one set of events will occur…
And if the switch is turned on, another set of events will occur.

So, now you would fill in the dialogue where the NPC asks the favor of the Hero…
And, at the end of the dialogue, you would insert a command that turns on the switch you specified on the second page of NPC.
PostPosted: Sat May 07, 2011 8:12 pm


GUIDE TO SWITCHES AND VARIABLES PART II
BY RAGNYROK


Introduction
This second part of my Switches and Variables Tutorial Series will deal with how to use multiple switches to activate different events at different times of the game. If you’ve read and understood the first part of this series, this next bit will be a breeze. So, I’ll just jump right in here and give you a scenario…

~~~~~~~~~~~~~~~~~~~~
The Scenario
Your Hero walks up to an NPC, and the NPC asks your Hero to retrieve an item for them. If your Hero hasn’t found the item yet, the NPC will say one thing. If your Hero has found the item, the NPC will say something different and thank your Hero then reward them.

~~~~~~~~~~~~~~~~~~~~
The How To
Make an Event, and name it NPC.
Make 4 Pages for the Event.
Create 3 Switches. Name the first Item Search, name the second Item Found, and name the third Item Search Over.
Set a graphic for your NPC, and set the event starting conditions as when a button is pushed.

Make another event in the Map where the Item can be found.
Name it whatever you like.
Make 2 Pages.
Make a Graphic for the Item Event…

Let’s finish setting up the NPC Event…

~~~~~~~~~~~~~~~~~~~~
NPC EVENT.//

Page One
This is the page where the NPC asks the Hero to get the Item.
So, what you will do here is make the dialogue between the NPC and Hero.
Have the NPC ask the Hero to get the Item…
And, at the end of the dialogue, turn the switch Item Search on.

Page Two
Make this Page start at a button push when the Item Search switch is on.
Have the dialogue be something along the lines of the NPC asking the Hero if he/she has found the Item and possibly have the NPC give directions to where the Item can be found. Just in case the Player forgot where to go.

Page Three
This will be the Page of the Event where the Hero has the Item and the NPC rewards them.
Make this Page start at a button push when the Item Found switch is on.
Have the dialogue be the Hero stating that they found the Item, and the NPC thanking them and possibly giving them some sort of reward.
At the end of this event, turn the switch Item Search Over on.

Page Four
Have this Page start at a button push when the Item Search Over switch is on.
Make some sort of regular dialogue. Or, if this NPC Event has another Quest/Mission/etc. for the Hero, go ahead and set it up however you like to.

~~~~~~~~~~~~~~~~~~~~
Item EVENT.//

Page One
Since this will be a Treasure Chest or an Item laying on the floor, or sommething similar…
Have the first Page be activated by the Hero pushing a button.
The actual Event will be the Hero getting the Item.
After the Hero gets the item, turn the switch Item Found on.

Page Two
Page Two will be a blank event.
If it’s a Treasure Chest, make the Graphic be a picture of a Treasure Chest that has been opened.(obviously the First Page would be a closed Treasure Chest if this is the case)
Make it activate by pushing a button and if the Item Found switch is on.
Once again…Leave the actual event itself blank.

~~~~~~~~~~~~~~~~~~~~
And, that’s it!
Pretty simple right?

In the next installment, I will teach you how to use Variables!

Ragniirok

8,150 Points
  • Elocutionist 200
  • Citizen 200
  • Forum Sophomore 300

Ragniirok

8,150 Points
  • Elocutionist 200
  • Citizen 200
  • Forum Sophomore 300
PostPosted: Sat May 07, 2011 8:16 pm


GUIDE TO SWITCHES AND VARIABLES PART III
BY RAGNYROK


Introduction
Thanks for reading the 3rd installment in my Switches/Variables Guide for RPG Maker VX!

This part is here to show you how to get started on using and understanding Variables.

Variables in RPG Maker are basically a value holder. If you ever want your game to remember a specific value for any reason at all, Variables are what you should be using. There’s alot of things you can do for your game using variables. They can even be used as Switches if you find yourself using way too many actual Switches.

~~~~~~~~~~~~~~~~~~~~
The Scenario
Let’s get started with your scenario for this part of the Tutorial!

An NPC tells your Hero he will give him a key if you defeat 3 slimes.

~~~~~~~~~~~~~~~~~~~~
The How To
First. We set up the slimes. Even though you may already have an Enemy named Slime…Make a new one!
Set the Enemy up however you would like to.

Next. Make a new Troop for the Slime. Just put one slime in the Enemy Troop.

Now. In the Battle Events…
Set the Conditions to happen If the Slime’s HP = 0 or lower.
Now, make a new event to Control Variables.
Select and name a Variable, as you would a Switch. Name this Variable “Slime’s Defeated”.
Set up the Event to Add a Constant of 1 to the Variable you just made.

What you just did is made a Battle where once the enemy is Defeated, the Variable, Slime’s Defeated, increases by one.

If you want to have more than one Enemy, but still want the number of enemy’s defeated to be counted, just add another Enemy into the Troop and change the Constant of 1 to a Constant of X; where X = how many Enemies are in the Troop.

Set up a place for the Hero to fight this group of Enemies.

Onto the NPC. This event will handle both Switches and Variables…
So, let’s hope you were paying attention in the last two Parts.

Make a new Event for the NPC. Name it whatever you like.
Set the Graphic as whatever you like.
Make 3 new Pages. You should now have 4 Pages altogether.

~~~~~~~~~~~~~~~~~~~~
FIRST PAGE
Make this event the Same Level as Character and Start at a Button Push.
Have the NPC ask the Hero to defeat x amount of Slimes or whatever Enemy you have chosen.
Once the Hero agrees, set a new Switch named “NPC Talk” to on.

What the 1st Page does is set up the Enemy Hunt.

~~~~~~~~~~~~~~~~~~~~
SECOND PAGE
Make the Event Starting Conditions If Switch NPC Talk is On and if Button is Pushed(obviously).
Have the NPC say something like “You still haven’t defeated x Slime’s yet!”.

This Event Page only occurs if the Hero talks to the NPC before he has defeated x Enemies.

~~~~~~~~~~~~~~~~~~~~
THIRD PAGE
Make the Event Starting Conditions If Switch NPC Talk is On and If Variable Slime’s Defeated is 3 or Greater and if a Button is Pushed.
Now have the NPC thanking the Hero for defeating the Slimes.
Have the NPC add the Key, or whatever Item/etc. you want the Hero to gain for helping the NPC…
And, set a final switch called “Slime Hunt Over” to on.

This Event Page is to reward the Hero once x Enemies have been defeated.
Then, it ends the process and the following Event Page happens from now on…

~~~~~~~~~~~~~~~~~~~~
FOURTH PAGE
Make the Event Starting Conditions If Switch Slime Hunt Over is On and if the Hero Pushes a Button.
Have the NPC say something like “Thanks again for the help! I hope that Key was useful!”

~~~~~~~~~~~~~~~~~~~~
That’s it! Pretty simple once you dive in there, right?

I hope you found this useful!
Reply
Game Making Tips and Tricks

 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum
//
//

// //

Have an account? Login Now!

//
//