what is meant by a switch ?

Medo

Veteran
Veteran
Joined
May 31, 2016
Messages
68
Reaction score
4
First Language
English
Primarily Uses
what is meant by a switch ? and when will I use it ? if u have a link pls put it . :)


Thx in advance :)  
 

8era

Villager
Member
Joined
Apr 4, 2016
Messages
12
Reaction score
4
First Language
English
Primarily Uses
RMMV
A switch is like a variable with only 2 values, it's either 0 or 1 (On or Off) 


Think about it as a lightswitch, if you press it, everything attached to it will turn on.
 

Amy Pond

Veteran
Veteran
Joined
Mar 17, 2012
Messages
667
Reaction score
1,361
First Language
English (UK)
Primarily Uses
When will I use it?


Switches are the single most important thing in the event list and you will use them everywhere.


Switches let the game know that you have done something. They are a simple variable that can be true or false.


You place them with conditional branches to test whether they are true or false, and use them like so.


Has the player Done This?


Yes - do that


No - don't do that, do this


If you don't use a switch at the end of an event, then even if the player saves their game, when they come back the event will be back to the start again. Switches are a means of saving the status of events. But moreso, they are used to track your progress through the game.
 

poatodude9

Warper
Member
Joined
Oct 23, 2015
Messages
3
Reaction score
0
Primarily Uses
Switches are, as everyone already said, variables that only have two states, on or off.


For example, if you were making a game about collecting 8 or so items, you could make a switch called "Item 1 collected". If this was on, you couldn't collect Item 1 again and, odds are, you'd be able to move on to the next area if you turn the switch on. You could also use it in an event. Say if Switch 1 wasn't on, there would be a show text command that says "Switch 1 is not on." but if it was on, you could either put in a conditional branch to see if a switch was on or not or a new event page. If Switch 1 WAS on however, you could make it say "Switch 1 is on. When you use it is when you want to block progression. Say you were in a town that you needed to do a quest in to progress. You could put an event with a locked gate graphic near where you leave from and, when you complete the quest, Switch <x> is turned on and you can pass due to the graphic changing on the new event page since Switch <x> is on.


I hope I explained Switches well enough!
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,683
Reaction score
451
First Language
English
Primarily Uses
N/A
switches are also the second most usefull event tool, you can do all sorts of crazy things with them. the most usefull being variables. combine the uses of switches and variables and you can do a lot of cool things in your game
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Eh... just the three of us killing mosquitoes and collecting them. Current kill count: 14.
Been watching videos about IRS phone scammers. Some really scummy people in the world.
Is the "2 status updates per 24h" still in effect?
My first attempt at Pixel Art :blink::) (I have no idea what I'm doing but I'm doing it)
Plugin instructions: *exists*
Plugin: What did he say? *error*

Forum statistics

Threads
93,724
Messages
914,942
Members
123,330
Latest member
Rikuto
Top