Weylon Santana Posted November 4, 2021 Share Posted November 4, 2021 Hello everyone, I want to introduce a simple system, simply to teach how to use more events parameters and string variables for beginners  The goal is to create a gate that will open when where 4 switches are active. There are 4 switches in your world and their activation form will be in two different ways.  When the order of switches doesn't matter Spoiler Create a global variable and put it as a string  Make your gate event on map - no spawn condition - just with a message - choose your graphic Okay, now our gate is always locked, let's create a switch to unlock it. Create an event on a map, choose your graphic and put a UNIQUE NAME --> this is very necessary, and as a first command let's create a conditional branch If our variable DOES NOT contain the event name (--> \evtparam{evtName} <--).  Logically, if it does not contain, it means that this switch is not active, so let's add, inside the conditional branch (right on the line below), create a command to set variable  Copy everything inside the arrow -->\pv{Gate}\evtparam{evtName} - <-- don't be scared we'll understand \pv{Gate} = It will get the value of the current variable, we are taking whatever value it has, if the player has activated another switch \evtparam{evtName} = It will add the name of this event to the value of the variable, so the event name must be unique  For the else (when the variable contains the event name), just shows a message that the switch has been activated. This is the final event Save him, and save the map. Copy it and paste as many times as you need in the places in the world you need, when pasting make sure you change the event name. I will paste three more times:  Now that the switches are ready, we need to get the gate to open In the event of the gate, create a new page, I put another graphic for and on conditions Let's check if the variable contains the 4 switches  and it's ready! When interacting once, apparently nothing will happen, but the switch name has already been added to the gate variable. if you interact again:  Before interacting with the last one look at the gate  After interacting with the switch  If you got this far, and did all correct, and tested it, everything worked normally. Just remember to teleport the player on the second page of the gate event, or make the event passable, etc.  When the order of switches matter Spoiler Which is when you want events to fire in specific order Here we are going to use an integer variable  On the first switch, check that the variable's value is 0, if is then add+1 on value, on else, send a message warning the player that it's the wrong switch this is our event  Copy and paste, and every time you paste change the conditional branch (right click and then edit) if it is 1 on 2th switch event if it is 2 on 3th switch event if it is 3 on 4th switch event and so on  For the gate on the first page of event, it doesn't need a condition, just a message that it's locked  For the second page, just check when the value is equal to the last activated switch  If you interact with any switch other than the one that checks to see if the variable is 0, you will have this  When you interact in the right order, you'll see this  And when to interact with the last  Redo all the steps in the two ways I showed you to learn more about how events work. Any questions you can send that I will respond as soon as possible. <3 Push, Vio, Alexoune001 and 1 other 4 Link to comment Share on other sites More sharing options...
Kamus Posted November 4, 2021 Share Posted November 4, 2021 If you allow me, soon I can create the same tutorial in the Spanish forums (Don't be scared if you authorize me and tag you later(?) hahaha nice tuto~ +10 Weylon Santana 1 Link to comment Share on other sites More sharing options...
Weylon Santana Posted November 6, 2021 Author Share Posted November 6, 2021 hahah It's ok, you can publish, we're here to help each other Kamus 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now