Trigger reference
Every trigger condition and action: what it does, its arguments, its text form and where it is stored in the map.
This reference covers every trigger condition and action in StarCraft and Brood War: what each one does, the arguments it takes, how it is written in text, and where each argument is stored in the map file.
The number, the text form and the table on each page come from the same tables the editor reads and writes maps with, so they match what it puts in a file byte for byte. Those tables have been checked against the triggers and briefings on Blizzard's own maps, and the text form is SCMDraft 2's TrigEdit syntax, so a line copied from one of these pages pastes into SCMDraft or into the editor's Text Trigger Editor. The descriptions say what the game does. Where a detail is not settled, the page leaves it out rather than guess.
- How triggers runA trigger is a list of up to 16 conditions and up to 64 actions, and the players it runs for.
- Players and groupsThese are the values a trigger stores for a player.
- Argument valuesThese are the values the enumerated arguments take, and the number each is stored as.
- The trigger recordTriggers are stored in the map's TRIG section, one 2400-byte record per trigger, in the order of the list.
- ConditionsA condition is a test a trigger makes on every cycle.
- AccumulateTrue when the player has at least, at most or exactly the amount of ore, gas, or ore and gas.
- AlwaysAlways true.
- BringTrue when the player has at least, at most or exactly the number of units of the type inside the location.
- CommandTrue when the player has at least, at most or exactly the number of units of the type anywhere on the map.
- Command the LeastTrue when the player the trigger runs for has fewer units of the type than any other player.
- Command the Least AtAs Command the Least, counting only the units inside the location.
- Command the MostTrue when the player the trigger runs for has more units of the type than any other player.
- Command the Most AtAs Command the Most, counting only the units inside the location.
- Countdown TimerTrue when the countdown timer shows at least, at most or exactly the number of seconds.
- DeathsTrue when the number of units of the type the player has lost is at least, at most or exactly the amount.
- Elapsed TimeTrue when at least, at most or exactly the number of game seconds have passed since the game started.
- Highest ScoreTrue when the player the trigger runs for has the highest score of the kind.
- KillTrue when the player has killed at least, at most or exactly the number of units of the type.
- Least KillsTrue when the player the trigger runs for has killed fewer units of the type than any other player.
- Least ResourcesTrue when the player the trigger runs for has less of the resource than any other player.
- Lowest ScoreTrue when the player the trigger runs for has the lowest score of the kind.
- Mission BriefingThe condition of every trigger in a mission briefing.
- Most KillsTrue when the player the trigger runs for has killed more units of the type than any other player.
- Most ResourcesTrue when the player the trigger runs for has more of the resource than any other player.
- NeverNever true.
- OpponentsTrue when the player has at least, at most or exactly the number of opponents still in the game.
- ScoreTrue when the player's score of the kind is at least, at most or exactly the amount.
- SwitchTrue when the switch is set, or when it is clear.
- ActionsAn action is what a trigger does once its conditions hold.
- Center ViewMoves the player's screen so the location is in the middle of it.
- CommentDoes nothing in the game.
- Create UnitCreates the number of units of the type for the player, at the middle of the location.
- Create Unit with PropertiesAs Create Unit, and the new units take the properties of one of the map's 64 *unit properties slots*: hit points, shields and energy as percentages, resources, hangar count, and states su…
- DefeatThe player loses and leaves the game.
- Display Text MessageShows the text on the player's screen.
- DrawEnds the game in a draw.
- Give Units to PlayerHands the number of units of the type in the location from one player to another.
- Kill UnitKills every unit of the type the player owns, anywhere on the map.
- Kill Unit At LocationAs Kill Unit, for the number of units of the type in the location.
- Leader Board ControlShows a leaderboard of how many units of the type each player owns.
- Leader Board Control At LocationA leaderboard of how many units of the type each player has in the location.
- Leader Board GreedA leaderboard of each player's ore and gas together, towards the goal.
- Leader Board KillsA leaderboard of how many units of the type each player has killed.
- Leader Board PointsA leaderboard of each player's score of the kind.
- Leader Board ResourcesA leaderboard of each player's ore, gas, or ore and gas.
- Leaderboard Computer PlayersWhether computer players appear on leaderboards: enable, disable or toggle.
- Leaderboard Goal ControlAs Leader Board Control, counting towards the goal.
- Leaderboard Goal Control At LocationAs Leader Board Control At Location, counting towards the goal.
- Leaderboard Goal KillsAs Leader Board Kills, counting towards the goal.
- Leaderboard Goal PointsAs Leader Board Points, counting towards the goal.
- Leaderboard Goal ResourcesAs Leader Board Resources, counting towards the goal.
- Minimap PingPings the location on the player's minimap.
- Modify Unit EnergySets the energy of the number of units of the type in the location to the percentage of their maximum.
- Modify Unit Hanger CountAdds the amount of interceptors to carriers, or scarabs to reavers, for the number of units of the type in the location, up to the most each can hold.
- Modify Unit Hit PointsSets the hit points of the number of units of the type in the location to the percentage of their maximum.
- Modify Unit Resource AmountSets how much ore or gas the mineral fields and geysers of the player in the location hold.
- Modify Unit Shield PointsSets the shields of the number of units of the type in the location to the percentage of their maximum.
- Move LocationCentres the second location (*Move*) on a unit of the type owned by the player inside the first (*Unit at*).
- Move UnitMoves the number of units of the type from one location to the middle of another, at once.
- Mute Unit SpeechSilences the voices of units, so that a transmission or a sound can be heard over them.
- OrderOrders the player's units of the type in one location to move, patrol or attack towards another.
- Pause GamePauses the game.
- Pause TimerStops the countdown timer where it is.
- Play WAVPlays a sound for the player.
- Preserve TriggerKeeps the trigger after it runs, so it runs again on every cycle its conditions hold.
- Remove UnitRemoves every unit of the type the player owns, anywhere on the map, without a death animation.
- Remove Unit At LocationAs Remove Unit, for the number of units of the type in the location.
- Run AI ScriptStarts an AI script for the player, which is normally a computer player: the custom-level scripts that make it play a normal game, or one of the small scripts that change its behaviour.
- Run AI Script At LocationAs Run AI Script, for the scripts that act on a place, such as *Value This Area Higher* or *Make These Units Patrol*.
- Set Alliance StatusSets how the player the trigger runs for stands towards the Player argument: enemy, ally, or ally for victory.
- Set Countdown TimerSets the countdown timer shown at the top of the screen, adds to it or takes from it, in seconds.
- Set DeathsChanges the player's death count for the unit type.
- Set Doodad StateTurns doodad units in the location on or off: the doors and traps of the Installation and other tilesets, which the map places as units.
- Set InvincibilityMakes the player's units of the type in the location invincible, or takes it away.
- Set Mission ObjectivesSets the text of the player's mission objectives screen.
- Set Next ScenarioChooses the map that follows when the player wins, as a campaign does.
- Set ResourcesSets the player's ore, gas, or both, adds to it or takes from it.
- Set ScoreSets the player's score of the kind, adds to it or takes from it.
- Set SwitchSets, clears, toggles or randomizes the switch.
- Talking PortraitShows the unit type's portrait talking in the player's portrait box for the time.
- TransmissionA message from a unit: the unit type's portrait talks, the text is shown, the sound plays and the location is pinged on the minimap.
- Unmute Unit SpeechLets unit voices play again after Mute Unit Speech.
- Unpause GameResumes a game that Pause Game stopped.
- Unpause TimerRestarts the countdown timer after Pause Timer.
- VictoryThe player wins and leaves the game.
- WaitHolds the rest of the trigger's actions for the time, in milliseconds of game time.
- Disable Debug ModeIn the game's list of actions, but StarEdit does not offer it and it is not known to do anything in released versions of the game.
- Enable Debug ModeAs Disable Debug Mode: not offered by StarEdit and not known to do anything.
- Mission briefing actionsA mission briefing is the screen before a single-player mission: portraits, text and speech, one briefing per player.
- In the source