RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Eventing Chapter II - Functions Of Switchs

0 Members and 1 Guest are viewing this topic.

****
Rep:
Level 87
In my own little world...
"Switchs Operations" Command
Today kiddos, we have a rather short lesson, but that's okay. One step at a time, eh?
This is probably one of the most used commands, you can't make a decent RPG with out with!
Switch Operation!

So what are switchs you ask? Switchs are basically what they're named, a switch.
Like a light switch, they turn ON and OFF!
These are usually associated with Pages or Conditonal Branchs. By now, you should know what pages
are, Conditonal Branchs is a foreign language for you right now if your a newbie, so don't worry about them.

Quote
Specific Switch
Switch Range
Quote
On
Off

The first box, your going to select weither you want to turn on/off one switch or a range of switchs.
The second box, your going to select weither you wanna turn the switchs ON or OFF.
Say I wanted to turn on switch two, I'd select "Specific Switch" (If it's not already selected) and click on the blue box with an arrow pointing right.
A new window called "Switchs" should've appeared, there should be a list of numbers ranging from 1-25, 26-50 and another list on the right saying 0001, 0002, etc. There are two things in here your going to need to know.

Quote
Array Size - Use this to specify how many switchs you want. At default, there are 50.
Name - Name your switchs, it's not necessary, but it helps keep track what switch does what.

I wanna turn on Switch 2, so I will select "0002:" and click ok, then select ON if it's not already selected and press Ok, mission complete, Switch 2 is turned ON.

Now, say switch 4,5,6 is on and I wanna turn them of, what do I do?
First I'll click "Switch Range", and the two boxes on the right become active.
The first box will determine when the range will start, the second determines when it will end.
I wanna turn 4,5,6 off, I'll put a 4 in the first box and a 6 in the second box.
This tells me I'm select switchs 4-6. Now I want 4-6 off, so under operation, click OFF.
And there you go, simple eh?

So what are the uses of Switchs?
The best example is a treasure chest, if you've made one without a switch, you've probably noticed the player can just keep hitting the confirm key and recieves the items over and over again.
To prevent this, turn ON a switch, it doesn't matter which one you use, as long as it hasn't been used. Name it, and stick it on the very bottom of the "Event Command" list. Now, make a second page, on the top left you'll seeing a section called "Preconditions", check the first "Switch" box and click the blue arrow and the "Switchs" list should pop up, select the Switch you used on Page 1.
In short, when you turn on the Switch, it'll perform and display anything on Page 2 rather than Page 1. If you put a message in Page 2 saying Empty, the player will get that message when the Switch is activated.

You may also use Switchs to activate a completely different event, using the same method.



"Local Switch Operation" Command
Another useful thing, now you may be wondering what's the difference between a Local Switch and a reguler Switch.
A Local Switch will only work in that one event, while you can turn on a Switch and activate another event elsewhere.
Not to complicated, right?

Quote
Local Switch
A

There are four Local Switchs: A, B, C, and D. (B, C, D are availible in the drop down box.)
They function pretty much the same with the exception above.
Under preconditions there is a seperate section called "Local Switch" instead of "Switch", do not confuse the two.
Turning the switch ON and OFF is similer with a normal switch, so I won't go into that.

So what would you use a Local Switch for? Well, you could use it for a treasure chest like above, that way if you wanted to make more than 1 treasure chest, you can copy and paste them without having to go into the event Command List and assigning a different switch each time.

Another example of Switchs and Local Switchs and making use of the ON and OFF.

Page 1
Code: [Select]
<>Message: Arkbennett:
:        : Hi!
<>Message: Player:
:        : Shut-up!
<>Local Switch A = ON
<>

If you set the preconditions on Page 2 to Local Switch A...

Page 2
Code: [Select]
<>Message: Player:
:        : Hi!
<>Message: Arkbennett:
:        : ...
<>Message: Player:
:        : Why aren't you talking?
<>Message: Arkbennett:
:        : You told me to shut-up.
<>Local Switch A = OFF
<>

Now that Local Switch A is turned off, it'll display Page 1 until the Local Switch A is turned on again.
Well, I hope nobody is confused, but if you are feel free to ask.
This conclude Chapter II, until next time guys.

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Nice, you can never have too many switches tutorials.