![Table of contents [*]](/skins/2/images/wiki_toc.png)
Wait Blocks
Wait Blocks"Wait blocks" is a common term for a wait action problem that many mappers face when their maps become more complex.Exactly what happens during a wait block is not entirely clear, but some of it has been figured out. Any given player can only run one wait action at a time. Additional waits trying to run will be delayed, or blocked. The most common wait block occurs when players use hyper triggers in conjunction with other triggers containing waits. Generally what happens is when their trigger with the wait action runs, it doesn't finish for a very long time. How do I avoid wait blocks?The simplest way to avoid this is to make the hyper triggers for a player that doesn't have any other wait actions. Hyper triggers are typically given to a computer player, in order for the human players to be able to use waits.Substitute your waits with Death Counters Order a unit to move from Point A to Point B. When it reaches point B, activate the trigger and move the unit back to Point A. Using the countdown timer. Another way would be to remake your hyper triggers so that they are at the bottom of the trigger list (this does not work unless you know what you are doing). What's happening during a wait block?Triggers run actions one at a time.When a trigger in the trigger list contains a wait, before StarCraft begins the "waiting" process, the trigger engine decides to check all the triggers before this one (in the trigger list) to see if their conditions are fulfilled. If any trigger's conditions are fulfilled, those triggers run before the "waiting". Theoretically, these 2 triggers should run like this: 1. Create 1 Marine. 2. Display text message: "Hello!" 3. Create 1 Marine (hit the wait, before the wait this runs). 4. Waiting 1000 milliseconds. 5. Display text message:"Good-bye!" That would be 1 trigger cycle (going through all the triggers once). Example When there's a wait instead of a marine creation trigger or a hyper trigger, the waits could go on longer, perhaps even "never" end. |