Home
Sitemap
Site News
Downloads
FAQ
Contact
• Basic Tutorials •
Maps
The Database
Events
Graphic Resources
• More Advanced Tutorials •
Maps
Events
The Database
Event Systems
• RGSS •
Script Fixes
Script Systems
• Other •
Using RMXP
Mini Tutorials
Miscellaneous
• Reference •
Reference

In this tutorial you will learn...

• What switches are
• How to set them using events
• How to use them in one simple situation
• How they are useful to quests and other events

So, we've looked at putting simple text into an event, but what if we want to make the event say something different if something is happening or if something has happened? Switches and variables solve that problem nicely.

So, let's double-click on our event and get started. We want to make a new event page. You can click on 'New Event Page', but I find it better to click 'Copy Event Page' and then 'Paste Event Page' because it copies the image as well. Now you should have an event that looks something like this...



This page is exactly the same as the first page, but we're going to change it now. First of all, delete the text command which is already in the Commands pane. Just highlight the line and press 'Delete'. Now, say we want the lady to change what she says if it is raining, we need to make her say something different. As before, double-click on the line where the @> symbols are and select 'Show Text...' to enter a new message. (You can also just change the existing message by right-clicking on the line of text and selecting 'Edit...')



Now we have a new message, we need to make it only show when it is raining (I'm not going to go over weather effects now; if you want to add these in go to the Adding Atmosphere tutorial in the Advanced Mapping section, or take a look at the Command List in the Advanced Eventing section). So, you see where is says Conditions? This is where we need to change something. Check the box by the first 'Switch' box, and select the arrow.



You can see where I'm clicking next. You will be presented with a box of switches. Select the first one, and type 'Rain' or something similar in the Name box at the bottom.



Now press OK, and the switch name should be in the box next to the check-box. Now we need to test out our event, but we need something to turn the switch on in-game, otherwise it won't work. We'll make a test event to turn the switch on. Press OK and exit out of the event editor, and double-click on a blank square to create a new event. Call it test switch. In the Commands pane, double-click or right-click and select 'Insert...' to insert a new command. Go over to the top of the right-hand column, and select 'Control Switches...' like so...



You will see a box like this. It should be set on your switch at the moment, so make sure that the ON or OFF select below is set to ON, and press OK. Change the event graphic to something so that you can see the event in-game, and press OK. Your event should look somthing like this (I've used 200-Support08 as the graphic for my event)...



This event is just a placeholder - in a real game situation you can use different things to turn the switches on (E.g. The same event that sets the weather effects). Now go into the game, and talk to your lady. She should say the first message...



And now talk to your test event. Nothing will seem to happen, but the switch will be turned on. Now talk to your lady. You should see the second message...



Great! You've successfully learned a bit about switches, and this basic understanding will help you grasp what's going on when I use swtiches later on. I have not covered anywhere near a fraction of the many uses of switches, but if I did, we'd be here all day! Use your common sense and hopefully you can put them to good use. Have a look at some other of my tutorials on eventing systems and perhaps the specific tutorials for more systems involving switches. In the next tutorial we'll be making a simple quest as we look at variables.


:: << Previous Tutorial ::      :: Home ::      :: Next Tutorial >> ::

RPG Maker XP © 2005 Enterbrain Inc.           © 2004 Xiph. Org Foundation           Ruby © 1993 - 2003 Yukihiro Matsumoto
This site, including images and textual content, were created by and belong to me.
© 2006 - 2011 All rights reserved.

This website and tutorials have all been written in my free time (what there is of it!), and hosting can be rather costly, so any donations are very gratefully received - no matter how small - even if you can spare 50p I would be grateful!