In Part 1 of this series, I discussed what parallel events are and briefly each of their functions. In this second part, I’ll expand on Automatically Start (Synchronize and Run Repeatedly), which I’ll refer to as Auto-Start Sync from now on.
The Auto-Start Sync TriggerAn Auto-Run Sync trigger starts automatically on the map and runs continuously in the background, processing whatever is in the event’s Event Details. And, while it’s running, other events, actions and triggers can take place as normal.
You’d typically use this when you want to synchronize certain things on maps, such as checking variables, graphics or timers, to name a few things.
Another example use is checking certain keys are pressed, as I did in Tutorial #12: Tips & Tricks (Part 1). Here I featured a routine where you cancel an image by pressing a key.
Using Switches with Auto-Start SyncRather than setting the Auto-Start Sync to trigger right away, you can also activate it using Conditions.
This will then run and synchronize in the background when a switch or other conditions is true. And then somewhere else you can toggle the switch OFF or reset the conditions to disable it.
Note that SGB doesn’t have a "common event", so Auto-Run Sync events need to be placed on each map that you want its Event Details to run synchronously and update from previous maps.
This is particularly useful when you’re using variables to store things like player stats from Character Information or Playtime for timers.
Multiple Auto-Start Sync in Events
While you can have multiple Auto-Start Sync triggers in the same event, bear in mind that order is important!
This is because SGB will go through each sheet to check for its triggers and conditions, and then prioritize any auto-run trigger it encounters. Auto-Run Sync triggers on different sheets will override the previous ones, meaning that you can only technically have one Auto-Run Sync trigger activated in the same event.
Hence using switches or variables to set the conditions under which they run. When these conditions are true, then the sheet on which they apply will take priority over the other sheets until they’re reset or no longer apply.
So, if you’re trying to build a HUD to display stats or the time (as examples), you can either have a single event with conditional auto-run sheets or have multiple one Auto-Run Sync events on each map to guarantee they’re all processed together. The latter is inconvenient and maybe isn’t the best method, but it is the most efficient.
In Part 3
In Part 3, I’ll cover the other two auto-run triggers, Triggered Automatically (1 Time Only) and Triggered Automatically (Repeated).