PDA

View Full Version : Tutorial On What Triggers Do, and How To Use Them


Polkaman
03-04-2008, 8:04 PM
On Battle.Net when I test a map, people always ask me how to make a map or what a certain trigger does. Well i've decided to make a tutorial on it, just for the hell of it. The leaderboard goal actions i've left out, but thats about it.
Conditions:
Accumulate: The trigger will activate if a player mines at least or at most a selected amount of resources. For Example, if a player mines 10 gas, (action)
Always: Doing this without a preserve trigger means that this trigger will activate in the beginning of the game. Having a preserve trigger on it will keep it happening throughout the rest of the game.
Bring: This condition is if someone brings a unit to a location, the action activates.
Command: Will be activated if a certain player commands a certain amount of units.
Command The Least: For when a player commands the least amount of (unit).
Command The Least At: For a player commanding the least amount of (units) at a certain location.
Command The Most: For when a player commands the most amount of (unit).
Command The Most At: For a player commands the most amount of (units) at a certain location.
Countdown Timer: The trigger will activate when the countdown timer is at a certain time.
Deaths: For when a player suffers a numfind amount of deaths.
Elasped Time: Trigger activates when the game has been going on for a certain amount of time.
Highest Score: Activates when a player has the highest score.
Kill: Activates when a player kills a number of (units).
Least Kills: Activates when a player has the least amount of kills.
Least Resources: Activates when a player has the least amount of resources.
Lowest Score: Activates when a player has the lowest score.
Most Kills: Activates when a player has the most kills.
Most Resources: Activates when a player has the most resources.
Never: Self-Explanetory, never do this, opposite of always.
Opponents:
Score: Trigger will start when a player's score is the desired amount.
Switch: Activates when a switch is set.Center View[/B]: Brings your screen to look at a certain location.
Comment: This is for naming the trigger, so it is organized.
Create Units: Simple, creates units at a location.
Create Units With Properties: Creates units with properties. For example create an invincible Zergling or create a Carrier with 8 interceptors already.
Defeat: Makes the current player lose the game.
Display Text Message: Shows a mesage to the current player.
Draw: End the game in a draw.
Give Units To Player: Gives the selected units to a player.
Kill: Kills all of the (unit) for a player.
Kill Units At Location Kills all of the (unit) for a player at a location.
Leaderboard (Control At Location)
Leaderboard (Control)
Leaderboard (Greed)
Leaderboard (Kills): Displays a board on the top-left of the screen for the number of kills of a (unit)
Leaderboard (Points): Displays a board on the top-left of the screen for a number of points, like kills an razings or a custom point.
Leaderboard (Resources): Displays a board on the top-left of the screen for the number of resources each player has.
Leaderboard Goal (Control At Location)
Leaderboard Goal ()
Leaderboard Goal ()
Leaderboard Goal ()
Leaderboard Goal ()
Leaderboard Computer Players
Minimap Ping: Has a green square on the minimap, pin pointing a location.
Modify Unit Energy: Modify's a unit's energy to a certain percent. For example, reseting a templar's energy to 100%.
Modify Unit Hanger Count: Modify's a unit's hanger points, like reseting a carrier's interceptors to 8.
Modify Unit Hit Points: Modify's a unit's life to a certain amount.
Modify Unit Resource Amount: Modify's a mineral field or vespene gas unit back to a certain amount.
Modify Shield Points: Modify's a unit's shield points (Protoss) to a certain amount.
Move Location: Moves a location on a unit. For example, would make the location always follow a Terran Marine.
Mute Unit Speech
Order: Orders a unit(s) to move, attack, or patrol to a certain place.
Pause Game: Pauses the game.
Pause Timer: Stops the timer.
Play WAV: Plays a soundtrack already uploaded onto the map.
Preserve Trigger: When a trigger is created with out a Preserve Trigger, it only happens once. Use this at the end of a trigger to make it keep happening.
Remove Unit: Removes all of the (units) for a player.
Remove Units At Location: Removes all of the (units) for a player at a location.
Run AL Script: Makes the computer do something.
Run AL Script At Location: Makes the computer do something at a location, use this to make computers mine and build.
Set Alliance Status: Sets certain people to ally and enemy for a player.
Set Countdown Timer: Starts a timer that counts down to zero.
Set Deaths: Set the number of deaths that a player has suffered.
Set Doodad State
Set Invincibility: Disables/Enables invincibility for a certain player at a location.
Set Mission Objectives: Sets the mission objectives for a player.
Set Next Scenario: After the current map is completed, this starts a new map right after. (Does not work on multiplayer.)
Set Resources: Adds, subtracts, or sets a player's resources to a certain amount.
Set Score: Adds, subtracts, or sets a player's score to a certain amount.
Set Switch: Clears, sets, toggles or randomizes a switch.
Talking Portrait: Makes the portrait talk at the bottom of the screen.
Transmission: Displays a transmission from a unit, also puts him on the bottom screen.
Unmute Unit Speech
Unpause Game: Unpauses the game.
Unpause Timer: Resumes the countdown timer.
Victory:: Makes the current player win the game.
Wait: Waits for some miliseconds, before moving on to the next action.

Twitch6000
03-05-2008, 2:13 PM
Btw you should add that each milliseconds 42 so 0-42 all is 42 milliseconds 43-84 is 84 and so forth.

Polkaman
03-05-2008, 6:16 PM
Um... What do you mean?

Twitch6000
03-05-2008, 11:41 PM
I mean the waits are not just 0-1-2-3-4.They are 42 84 162 etc..

Polkaman
03-06-2008, 5:23 PM
Yeah, i guess LoL

Durandal
03-06-2008, 6:55 PM
I have no idea what he's saying, but there's 1000 milliseconds in a second :\

Twitch6000
03-06-2008, 9:18 PM
at the bottom of this link explains what I am trying to explain.
http://www.maplantis.org/index.php?wiki=6

intranetusa
03-07-2008, 8:37 AM
i still don't fully understand what hyper triggers do. It seems to me that if you reset the wait cycle when the hyper trigger is reached, doesn't that slow down the trigger processing?

I'm trying to prevent the problem of wait blocking/wait stacking as mentioned in maplantis, and I'm not sure how hyper triggers would help... :/

Protogod
03-07-2008, 3:21 PM
Not for discussion. This is a resource-only section.