Hyper Triggers are essential to almost every high-end map, they increase the rate at which triggers run, allowing map makers to react much more quickly to player actions, creating much more precise trigger systems.
Whenever a wait action is hit by StarCraft, the conditions of every trigger are rechecked, before the wait is executed. Hyper Triggers
exploit this by constantly hitting tiny wait actions, causing the triggers to be checked at a much faster pace than usual.
Normally triggers are checked at a rate of one trigger cycle per in-game second. With Hyper Triggers, this rate can be increased to
8 trigger cycles per in-game second, or 11.905 trigger cycles per real-time second on Fastest(approximately once every 84 milliseconds).
Simple Hyper Triggers are the most common type of Hyper Triggers used. As their name suggests, they are extremely simplistic, although they have a few flaws. These flaws are Wait Blocks, NEOs, and placement, all of which can be avoided if you use them correctly.
Creating Simple Hyper Triggers is easy, all you have to do is spam Wait(0) actions, as these are the shortest waits, and create the fastest
Hyper Triggers, so you would make a trigger with 63 Wait(0)'s, and a Preserve Trigger, or 62 Waits, a Comment, and a Preserve Trigger, whichever you
prefer.
The trigger should look something like this:
| Conditions |
| Always |
| Actions |
| Wait for 0 milliseconds |
| Wait for 0 milliseconds |
| Wait for 0 milliseconds |
| Wait for 0 milliseconds |
| Wait for 0 milliseconds |
| Wait for 0 milliseconds |
| Wait for 0 milliseconds |
| (Copy Wait for 0 milliseconds 63 or 62 times) |
| Comment(Optional) |
| Preserve Trigger |
Once you've made that trigger, copy it two more times, generally, for a total of three of the same trigger, or more if your map needs
it to avoid the NEO, and then you've got your Hyper Triggers!
It's a common misconception that you must put the Wait 0's in every trigger you make, this is not true, you only need to make
a few of these triggers, without any other actions, and they will speed up every other trigger in your map. Which player these
triggers are under and where they are in the trigger list do matter, and they are discussed below.
The only characteristic of Simple Hyper Triggers that cannot be fixed is their inablitity to be turned off and on instantly, if you use a condition other than Always, it will take a period of time before they will turn off, which will get progressively longer depending on how long they stay on.
Complex Hyper Triggers, while still very simplistic, are at least comparatively more complex, however, they are worth the extra complexity
because they do not have any of the flaws that Simple Hyper Triggers have. In order to create them, you must use at least two different players,
however, Forces and All Players can also be used.
Here's how they look.
| Players |
| Player 7 |
| Conditions |
| 'Switch 01' is Cleared |
| Actions |
| Wait for 0 milliseconds |
| Set 'Switch 01' |
| Wait for 0 milliseconds |
| Preserve Trigger |
| Players |
| Player 8 |
| Conditions |
| 'Switch 01' is Set |
| Actions |
| Wait for 0 milliseconds |
| Clear 'Switch 01' |
| Wait for 0 milliseconds |
| Preserve Trigger |
And you're done! The players for those triggers can be any player, or force, that you want, including All Players, in fact, using a force is often a better idea, as explained here. Complex Hyper Triggers do not cause Wait Blocks, but instead they temporarily turn off while the wait runs. They also do not have a NEO, and their placement does not matter at all.
A huge amount of problems people have involve incorrect placement of their Hyper Triggers, not only placement of of the triggers in the trigger list, but which player(s) they go under. If you would rather not have to worry about placement, I would highly recommend using Complex Hyper Triggers, which do not have any problems involving placement, however, they can still be optimized if for the correct players.
For both Complex and Simple Hyper Triggers, selecting the correct players, or more importantly, forces, can be crucial in allowing you to still use Waits when they are necessary, and still have your Hyper Triggers run.
The most commonly used placement for Simple Hyper Triggers is in a player that has no other waits, this stops Wait Blocks from occuring, and waits can still be used for other players without problems. However, they can also be placed under a Force, or even under All Players, if you put them in the correct spot on the trigger list, which will be explained below.
In the earlier example in this tutorial of Complex Hyper Triggers, they were
put under 2 different players. This is the most common placement, however, you can also put one of them under a Force, or for All Players, which actually
allows you to put Waits for the same player as the Hyper Triggers, without the Hyper Triggers turning off while the Wait runs. If you do that,
the only time that the Hyper Triggers would turn off would be if a Wait ran under every single player that had the Hyper Trigger under them, at the same time.
You can also place both triggers under different forces, or one under All Players and one under a force, and this would reduce the chance of them turning
off from Waits even more.
Trigger order does not matter for Complex Hyper Triggers, however, it is always a better choice to put Simple Hyper Triggers
at the bottom of the trigger list, or below any Waits, because if it is above any Waits, those waits will not run until the currently
stacked Waits from the Hyper Triggers run out, but if they are below the Wait, those Hyper Triggers will simply turn off while that Wait runs.
This is how you can put Simple Hyper Triggers under All Players or a Force without any problems, because if they are at the bottom of the
trigger list, they will turn off for that player while a Wait runs, but continue to run for any other players who own the Hyper Triggers, so if placed
under All Players, the Hyper Triggers will only completely turn off if a wait were to run for every player at the same time.
A problem with Simple Hyper Triggers is the Next Ending Occurence, or NEO. The NEO is a short period of time where the Hyper Triggers run out temporarily, and a single normal speed trigger loop will run. While this really causes no problem with most maps, it's also easy to avoid, so there is no reason not to do so.
What it comes down to is having more copies of Hyper Triggers, the more you have, the longer you can go before the next NEO. To calculate how long you have until the NEO, you use this equation:
| Time until NEO(in seconds) = (x + 1)n * 0.084 |
| When x is he number of Wait(0) actions in each Hyper Trigger |
| When n is the number of copies of Hyper Triggers |
So, to give you an idea of how long it takes to hit the NEO, if I were to have three Hyper Triggers with 63 Wait(0) actions each, it would take 6.11 hours to reach the first NEO, so if you think your map could last longer than that, it's pretty easy to just make a fourth copy of the Hyper Triggers, and that would last you over two weeks.
Sometimes with maps that contain thousands of triggers, they begin to lag, whether you're playing alone or not, the strain of checking
thousands of triggers almost 12 times per second is too much to handle, and so the solution that many mappers go with is to give up. However,
this is not the only way out, you can instead reduce the speed of your Hyper Triggers. To change the speed of your Hyper Triggers, all you need
to do is change the time of the Wait actions.
Note that changes should be made in increments of 42, as Wait times are actually rounded up to the
next multiple of 42, so a Wait(0) is actually the same length as a Wait(42). Of course, changing your Hyper Trigger speed will most likely mess up
any Death Count Timers or any other systems based on trigger cycle speeds,
so if you change the Hyper Trigger speeds, you will also need to adjust those accordingly. To find out the rate that Hyper Triggers are checked, you
can use this program.