Hyper Triggers

**Hyper triggers** (often shortened to "**hypers**") are *StarCraft* triggers that use game glitches to speed up the rate at which trigger cycles are executed. Under normal circumstances, triggers are checked every two game seconds; hyper triggers cause triggers to be checked every other frame of animation (about twelve times per real-time second on the fastest game speed).

## Basic hyper triggers

The basic hyper trigger method uses Wait actions. To avoid wait blocks, the player that owns these triggers cannot own any other triggers that use Waits -- unless there is another player also running hyper triggers. Furthermore, these triggers must be placed at the bottom of the trigger list. This is for several reasons, firstly that (so long as you have at least two players running hyper triggers), one of them will be able to run a Wait action and the map hyper triggers will not pause (because there will be another player still properly running hyper triggers). If no computer players are available to run hyper triggers, hyper triggers must be included in the trigger lists of every player, thus ensuring that there will always be at least one set of hyper triggers running.

The following trigger is a hyper trigger. It is strongly recommended that you use multiple copies of it in your map; generally, about four of them will do.

If you wish to add a Comment action, simply remove one Wait action to make room for it. (The number of actions in the trigger should be sixty-four -- the maximum amount of actions a trigger can hold. So without a Comment, you should have 63 Waits; with a Comment, you should have 62. Do *not* forget the Preserve Trigger action.)

*StarCraft* Trigger [template]
Description
A basic hyper trigger.
Players

* *[any player following the above recommendations]*

Conditions

* Always

Actions

* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Wait 0 milliseconds.
* Preserve trigger.

Multiple copies of this trigger (at least four) are strongly recommended.

### How it works

These hyper triggers cause *StarCraft* to check the map's trigger list about 11.904761904761904761904761904762 times per second. This happens because before a Wait action, *StarCraft* checks all trigger conditions in any trigger for any player. Thus, by stacking very short wait periods in a single trigger, *StarCraft* is forced to check all triggers many times per second.

The reason that multiple copies of the trigger are needed is because once *StarCraft* has finished running through all hyper triggers in a map (which does happen eventually), there will be a gap (known as an **NEO**, or **Next Ending Occurrence**) of approximately two seconds -- the normal cycle time. This gap can cause problems with timing. However, the more hyper triggers there are in a map, the longer the period between gaps will be, via the following formula:

(*x* + 1)*n* \* 0.084 = number of seconds until NEO

where *x* is the number of Wait actions in a hyper trigger, and *n* is the total number of separate hyper triggers in your map. Using the example of four copies with 63 wait actions in each:

(63 + 1)4 \* 0.084 seconds

(64)4 \* 0.084 seconds

16777216 \* 0.084 seconds

1409286.144 seconds

Therefore, the time between NEOs will be approximately 391.5 hours, or about 16 days. All maps last considerably less time than this, and so this number of hyper triggers will be sufficient in all situations. Bear in mind, however, that there will be one NEO at the beginning of the map, which happens because *StarCraft* does not cycle triggers at the beginning of the game, instead waiting for a standard cycle period and then running through the trigger lists. As soon as the first cycle has been completed, however, you need not worry about NEOs.

## Complex Hyper Triggers

Complex hyper triggers are a rather ironically-named pair of triggers that are fairly easy to implement. They may be placed anywhere on the trigger list and do not cause wait blocks, making them more convenient than basic hypers. Furthermore, they rely on switches or death counters (either may be used), so they can be activated or deactivated with ease. However, they are trickier to set up, because the two triggers must be assigned to two different players. As a note of trivia, complex hypers also have no NEOs.

Here are the triggers for complex hypers that use a switch. To convert them over to death counters, simply use the Deaths condition and Set Deaths action.

*StarCraft* Trigger [template]
Description
Complex Hyper 1
Players

* Player 1 *[can be any player, but the hypers must use different players]*

Conditions

* Switch 1 is Cleared.

Actions

* Wait 0 milliseconds.
* Set Switch 1.
* Wait 0 milliseconds.
* Preserve trigger.

*StarCraft* Trigger [template]
Description
Complex Hyper 2
Players

* Player 2 *[can be any player, but the hypers must use different players]*

Conditions

* Switch 1 is Set.

Actions

* Wait 0 milliseconds.
* Clear Switch 1.
* Wait 0 milliseconds.
* Preserve trigger.

## Nonzero waits

Should hyper triggers ever noticeably lag the map, the amount waited can be increased, which will delay each trigger cycle by an additional frame past multiples of 42 on fastest. On other speeds, there are different breakpoints for waits (faster is multiples of 48). Therefore, wait 0-42 will produce 2 frame hyper triggers, wait 43-84 will produce 3 frame hyper triggers, wait 85-126 will produce 4 frame hyper triggers, and so on. In practice, this has little use, as hypers should always be on wait 0 for speed. If you want any sort of delay, it's best to use death Counters as a timer. 3 frame hypers are peculiar, since they allow you to run triggers on frames which 2 frame hypers can't (ie frame 0, 3, 6, 9 vs frame 0, 2, 4, 6, 8). By utilizing complex hyper triggers, it is also possible to change the speed of hyper triggers from 2 or 3 frame on the fly.