What is Autorun?
Autorun is an option for the Trigger of an event. If selected, the event will run continuously right after the map has loaded. And that is the important part, right after! When an autorun event runs, the player has no control over the game. The player cannot move and other events cannot occur until the autorun event has ended. By contrast, when a **Parallel **Trigger event runs, the event runs continuously in the background once the map has loaded but the player still has complete control and can move on their own.
Switches
Switches are a global toggles that can turn on and off and each event can access them and manipulate them. You can have events modify and/or check the state of these switches (on or off). They can be used to transfer information between events. First, to create and set a position/state for a switch, click on an event on your map and double-click the contents. Now select “Control Switches…” from tab 1 and select any switch slot from the list. Give the switch a name, and your good to go. Now, just select a state for the switch to be in once the event has run (“ON” or “OFF”). At the beginning of the game, naturally, all switches are set to the “OFF” state. To change it to the “ON” state an event must be triggered that actually changes the state of the switch like we discussed. Events don’t have to create a switch to change its state. Now that you’ve added a switch to the database, you just have to select the same switch through the same process, and just select a position without having to create another switch.
Now that we’ve discussed switch creation and changing the state, let’s discuss how to actually check the switch’s state and perform an action after checking. To do this, select the event that will check our switch. Then, click “New Event Page” near the top of the pop-up window. This new event page is basically a separate set of commands for the event to run if certain conditions are met. In this case, those conditions will be our switch’s position. To do this, in the conditions box, check the “Switch” box and select the switch you just created from the drop-down menu. Now, if this switch is in the “ON” position, the event will run the commands on event page 2. Else, it’ll run the commands on event page 1. The game checks these event page conditions in Descending order (i.e. … 5, 4, 3, 2, 1) and if one of the pages’ conditions are met, only that page’s commands will run.
Another option to check the state of a switch is to use a “conditional branch.” Simply go to your original event page and click on the Contents again. Now, select “Conditional Branch” from the “Flow Control” section. Then, pick the “Switch” option in the pop-up and set the state we are checking for (“ON” or “OFF”). Now, if the switch is in the selected position, you can add more commands for the event to do by clicking in the area created in between the new “IF” statement. And that’s it!
Practice
To practice with switches, here is an assignment. Try to add a part of your game where if a person walks onto a tile of water on a river, a new character will appear on one end of the river. The character will be an NPC and it can be treated as an event as we discussed before. Then, you can use the Event Touch trigger on all the tiles of the river and set a switch on when a tile is stepped on. That switch should constantly be checked and then trigger the “summoning” (change of image) of the new NPC on the river. And that’s all!
How do you create an autorun event?
In Event Mode, select a tile on the map, double-click, and then the Event Editor will open. As we don’t want this tile to look different because of the event, we will leave it without an image. The most important part is setting the Trigger field to ‘Autorun.’ Then, all you need to do is modify the Contents of the event. Try running the game now. What do you see?
You should’ve encountered a problem. The event won’t stop! To stop this, we will use switches. Simply turn a switch “ON” after the autorun event, and then create a new event page with no autorun event that runs when that switch is “ON” (use the Conditions box as discussed earlier). Now, when the switch is turned on, the game will only run the event page 2 which is empty so no autorun event will run and the player can control the character again!
When would you really use autorun events?
Autorun events are best used for cutscenes. When a player enters a new map or area, cutscenes can be used to dramatize the game.
Making a Cutscene
We’re not going to go into detail with cutscenes, but basically, all you need to do for a basic automatic movement of the player after the player has entered the new map is create an autorun event that sets a “movement route” for the player from tab 2 and maybe has dialogue along the way all ended with a switch to stop the autorun event as discussed above.