Triggers/Events

From SC2Mapster Wiki
Jump to: navigation, search

If you want to create an action or function page, use this Template. If you want to create a new trigger category page, use this Template.

Contents

Trigger Elements

Ui-editoricon-triggereditor newevent.png Events
Ui-editoricon-triggereditor newvariable.png Variables
Ui-editoricon-triggereditor newcondition.png Conditions and Functions
Ui-editoricon-general triggers.png Actions
Ui-editoricon-triggereditor newpresettype.png Presets and Constants

Events

Events are used in starcraft 2 to initiate a trigger. When the event occurs in the game, the trigger will run, as long as all the conditions are valid.

Event Navigation

Ui-editoricon-triggercategories actor.png Actors Ui-editoricon-triggercategories ai.png AI Ui-editoricon-triggercategories aiadvanced.png Advanced AI Ui-editoricon-triggercategories animation.png Animation Ui-editoricon-triggercategories bank.png Banks
Ui-editoricon-triggercategories cameras.png Cameras Ui-editoricon-triggercategoriescampaign.png Campaign Ui-editoricon-triggercategories catalog.png Catalog Ui-editoricon-triggercategories cinematics.png Cinematics Ui-editoricon-triggercategories conversations.png Conversation
Ui-editoricon-triggercategories conversion.png Conversion Ui-editoricon-triggercategories datatable.png Data Table Ui-editoricon-triggercategories debug.png Debug Ui-editoricon-triggercategories dialog.png Dialog Ui-editoricon-triggercategories environment.png Environment
Ui-editoricon-triggercategories game.png Game Ui-editoricon-triggercategories general.png General Ui-editoricon-triggercategories leaderboards.png Leaderboard Ui-editoricon-triggercategories math.png Math Ui-editoricon-triggercategories melee.png Melee
Ui-editoricon-triggercategories objective.png Objective Ui-editoricon-triggercategories orders.png Order Ui-editoricon-triggercategories ping.png Ping Ui-editoricon-triggercategories player.png Player Ui-editoricon-triggercategories playergroup.png Player Group
Ui-editoricon-triggercategories point.png Point Ui-editoricon-triggercategories portrait.png Portrait Ui-editoricon-triggercategories region.png Region Ui-editoricon-triggercategories unitselection.png Selection Ui-editoricon-triggercategories sound.png Sound
Ui-editoricon-triggercategories story.png Story Ui-editoricon-triggercategories strings.png String Ui-editoricon-triggercategories techtree.png Tech Tree Ui-editoricon-triggercategories texttag.png Text Tag Ui-editoricon-triggercategories timer.png Timer
Ui-editoricon-triggercategories transmission.png Transmission Ui-editoricon-triggercategories triggers.png Trigger Ui-editoricon-triggercategories ui.png UI Ui-editoricon-triggercategories unit.png Unit Ui-editoricon-triggercategories unitgroup.png Unit Group
Ui-editoricon-triggercategories variable.png Variable Ui-editoricon-triggercategories visibility.png Visibility

Index of Events

AI

Player Sends AI Wave

  • This event fires when an AI wave is sent by the specified player.

Camera

Camera Moves

  • This event fires when the specified player moves the camera. Use "Camera Move Reason" to get the way in which the camera was moved.

Cinematics

Movie Finished

  • No information

Movie Function

  • This event is only usable if you play a movie texture on a model, and that movie texture has a .event file with the same name as the movie texture. The .event file can specify times when the movie should send an event to the trigger system. Each event in the .event file has a name that must be specified in the Function Name parameter if you want to respond to that event.

Movie Started

  • No information

Conversation

Conversation Reply Selected

  • This event fires when the specified player selects the specified reply from the specified conversation. Use "Selected Conversation" to get the conversation and "Selected Conversation Reply" to get the reply.

Data Conversation State Changed

  • This event fires when the specified conversation state is changed during a data conversation, or when it is changed through the "Set Data Conversation State" action. Use "Triggering Conversation State" to get the conversation state.

Dialog

Dialog Item Is Used

  • This event fires when a dialog item is used. Use "Dialog Item Event Type" to find out how the event was triggered. Use "Used Dialog Item" to get the dialog item that triggered this event. Use "Triggering Player" to get the player that used the dialog item.

Environment

Effect Used

  • This event fires when the specified effect is used by the specified player.

Effect Used From Scope

  • This event fires when an effect from the specifed scope is used by the specified player.

Game

Chat Message

  • This event fires when the specified chat message is typed by the specified player. If exact match is selected, then the string the player enters must be identical to the specified string for the event to fire. If partial match is selected, then the event will fire if the player enters the specified string plus any number of additional characters after it. Use the "Chat String" function to refer to the message being entered. Use "Triggering Player" to get the player that typed the message.

Cheat Used

  • This event fires when the specified player uses the specified cheat. Use "Cheat Type Used" to get the cheat that was used.

Load Game Finished

  • This event fires just after a game is finished loading.

Map Initialization

  • This event fires when a map starts running.

Save Game Started

  • This event fires just before a game is saved.

Save Game Finished

  • This event fires just after a game is saved.

Ping

Player Ping

  • This event fires when the specified player pings the minimap.

Player

Player Changes Alliances

  • This event fires when a player changes alliances. Use "Triggering Player" to get the player.

Player Joins Game

  • This event fires when a player joins the game. Use "Triggering Player" to get the player.

Player Leaves Game

  • This event fires when a player leaves the game with the specified victory type. Use "Triggering Player" to get the player.

Player Property Changed

  • This event fires when the specified property for the specified player changes. Use "Triggering Player" to get the player. Use "Triggering Player Property" to get the property that changed.

Story

Mercenary Panel Exited

  • This event fires when a player closes the mercenary panel.

Mercenary Panel Purchase

  • This event fires when a player clicks the purchase button on the mercenary panel.

Mercenary Panel Selection Changed

  • This event fires when a player selects the specified MercenaryId on the mercenary panel.

Mission Archive Panel Play Scene

  • This event fires when a player chooses to replay a cutscene through the mission archive panel. Use "Selected Mission Archive Scene" to get the scene the player selected.

Mission Archives Panel Exited

  • This event fires when a player closes the mission archives panel.

Mission Archives Panel Play Mission

  • This event fires when a player chooses to replay a mission through the mission archives panel. Use "Selected Mission Archive Difficulty" to get the difficulty the player selected. Use "Selected Mission Archive Mission" to get the mission the player selected.

Mission Archives Panel Selection Changed

  • This event fires when a player changes the active selection in the mission archives panel.

Planet Panel Birth Complete

  • This event fires when the planet panel finishes playing its birth animation.

Planet Panel Canceled

  • This event fires when the specified player closes the planet panel.

Planet Panel Death Complete

  • This event fires when the planet panel finishes playing its death animation.

Planet Panel Launched

  • This event fires when the specified player opens the planet panel.

Planet Panel Misson Selected

  • This event fires when a player clicks on a planet on the planet panel. Use "Clicked Planet" to get the planet that was clicked.

Planet Panel Pressed Replay Button

  • This event fires when the specified player presses the replay button on the planet panel.

Purchase Category Selected

  • This event fires when the specified player selects the specified purchase category from the storymode armory.

Purchase Exit

  • This event fires when the specified player exits the storymode armory tech purchase interface.

Purchase Item Selected

  • This event fires when the specified player selects the specified purchase item from the storymode armory.

Purchase Made

  • This event fires when the specified player purchases the specified tech from the storymode armory. Use "Purchased Purchase Item" to get the item that was purchased.

Research Panel Close Button Clicked

  • This event fires when a player closes the research panel.

Research Panel Research Button Clicked

  • This event fires when a player clicks the research button on the research panel.

Research Panel Selection Changed

  • This event fires when a player selects the specified Research Item on the research panel.

Victory Panel Exited

  • This event fires when a player closes the victory panel.

Victory Panel Play Mission Again

  • This event fires when a player clicks the play again button on the victory panel.

Timer

Periodic Event

  • This event fires periodically whenever the time specified elapses.

Time Elapsed

  • This event fires once the specified amount of time has passed in game.

Timer Expires

  • This event fires whenever the specified timer reaches zero. This catches both one-shot and repeating timers. Use the "Triggering Timer" function to refer to the expiring timer.

Trigger

Generic Event

  • Generic events are sent from triggers using the Send Generic Event action.

Player Skips Trigger

  • Occurs when a player attempts to skip a trigger with the Escape key, even if no other players skip it.



Selection

Unit Is Clicked

  • This event fires when a unit is clicked by a player. Use "Triggering Unit" to refer to the unit being clicked. Use "Triggering Player" to get the player.

Unit Is Highlighted

  • This event fires when a unit is highlighted or unhighlighted by a player. Use "Triggering Unit" to refer to the unit being highlighted/unhighlighted. Use "Triggering Player" to get the player.

Unit Is Selected

  • This event fires when a unit is selected. Use "Triggering Unit" to refer to the unit being selected or deselected. Use "Triggering Player" to get the player that selected the unit.


UI

Abort Mission

  • This event fires when a player clicks the abort mission button.

Button Pressed

  • Only register for this event when you absolutely need it, as it will generate network traffic from all players for every button they press. This event fires when a player presses a command card button. Use "Button Pressed" to get the button that was pressed.

Custom Dialog Dismissed

  • This event fires when a player selects an option on the Custom Dialog. Use "Custom Dialog Result" to get the option the player selected. Use "Triggering Player" to get the player.

Game Credits Finished

  • Event is triggered when the end game credits finish rolling for the specified player.

Game Menu Item Selected

  • This event fires when a player selects an item on the Game Menu Dialog. Use "Game Menu Item Selected" to get the menu item that the player selected.

Hotkey Pressed

  • Only register for this event when you absolutely need it, as it will generate network traffic from all players for every hotkey they press. This event fires when a player presses the specified hotkey. Use "HotKey Pressed" to get the hotkey that was pressed.

WARNING: If code handles the hotkey press (for example, Army Select is pressed and code responds by selecting all army units), this event WILL NOT fire!

Key Pressed

  • Only register for this event when you absolutely need it, as it will generate network traffic from all players for every button they press. This event fires when a player presses the specified key. Use "Key Pressed" to get the key that was pressed. Use "Alt Key Pressed", "Control Key Pressed", and "Shift Key Pressed" to find out what modifier keys were pressed.

Mouse Clicked

  • Only register for this event when you absolutely need it, as it will generate network traffic from all players for every mouse click they make. This event fires when a player clicks a mouse button. Use "Mouse Clicked Button" to get the button that was clicked. Use "Mouse Clicked UI Pos X" and "Mouse Clicked UI Pos Y" to get the UI X,Y position where the player clicked the mouse. Use "Mouse Clicked World Pos X", "Mouse Clicked World Pos Y", and "Mouse Clicked World Pos Z" to get the X,Y,Z world position where the player clicked the mouse. Use "Alt Key Pressed", "Control Key Pressed", and "Shift Key Pressed" to find out what modifier keys were pressed.

Mouse Moved

  • Only register for this event when you absolutely need it, as it will generate network traffic from all players for every mouse move they make. This event fires when a player moves themouse. Use "Mouse Moved UI Pos X" and "Mouse Moved UI Pos Y" to get the UI X,Y position where the player moved the mouse. Use "Mouse Moved World Pos X", "Mouse Moved World Pos Y", and "Mouse Moved World Pos Z" to get the X,Y,Z world position where the player moved the mouse.

Mouse Wheel

  • Only register for this event when you absolutely need it, as it will generate network traffic from all players for every mouse wheel move they make. This event fires when a player moves the mouse wheel. Use "Mouse Wheel Spin" to get the amount the mouse wheel moved.

Resources Requested

  • No information

Resources Traded

  • No information

Target Mode Updated

Unit

Unit Absorbs Damage

  • This event fires when a unit absorbs damage due to a behavior damage response. Use "Triggering Unit" to get the unit that absorbed damage. Use "Triggering Behavior" to get the behavior that absorbed damage on the unit. Use "Triggering Damage Absorbed" to get the amount of damage absorbed. Use "Damaging Unit" and "Damaging Player" to get the unit and player that caused the damage.

Unit Acquires Powerup

  • This event fires when a unit acquires a powerup. Use "Triggering Powerup" to get the powerup.

Unit Acquires Target

  • This event fires when a unit acquires a target. Use "Acquired Target" to get the target that was acquired. Use "Triggering Player" to get the owner of the unit that acquired a target. Use "Triggering Unit" to get the unit that acquired a target.

Unit Arming Progress

  • This event fires when a unit's arming progress reaches a certain stage. Use "Triggering Player" to get the player that triggered the arm ability. Use "Triggering Unit" to get the arming unit. Use "Triggering Progress Unit Type" to get the unit type of the unit in the queue. Use "Triggering Progress Unit" to get the unit in the queue.

Unit Attribute Change

  • This event fires when a unit's attribute points change. Use "Triggering Attribute Points" to get the number of attribute points. Use "Triggering Behavior" to get the behavior.

Unit Becomes Idle

  • This event fires when a unit becomes or stops idling.

Unit Behavior Changes

  • No information

Unit Behavior Changes From Category

  • No information

Unit Changes Ability Auto Cast State

  • This event fires when a unit changes an ability's auto cast state. Use "Triggering Ability" to get the ability that was used. Use "Triggering Player" to get the player that used the ability. Use "Triggering Unit" to get the unit that used the ability. If the parameter "Include Shared Abilities" is set to true, instead of matching the specific event, it will match any event that has the same ability set id (AbilSetId).

Unit Construction Progress

  • This event fires when a unit's construction stage reaches a certain progress. Use "Triggering Player" to get the player that triggered construction. Use "Triggering Unit" to get the unit that is doing the constructing. Use "Triggering Progress Unit Type" to get the unit type of the unit that is under construction. Use "Triggering Progress Unit" to get the unit that is under construction.

Unit Dies

  • This event fires when a unit dies. Use "Damage Source Position" to get the position of the unit that dealt the killing blow. Use "Killing Player" to get the owner of the unit that dealt the killing blow. Use "Killing Unit" to get the unit that dealt the killing blow. Use "Triggering Death Type Check" to get the death type. Use "Triggering Player" to get the owner of the unit that died. Use "Triggering Unit" to get the unit that died. Use "Experience Level Of Unit" to get the experience level of the unit that died. Use "Total Experience Of Unit" to get the total number of experience points the unit had before it died.

Unit Enters/Leaves Point

  • This event fires when a unit enters or leaves a certain distance around a point. Use "Triggering Unit" to get the unit.

Unit Enters/Leaves Range Of Unit

  • This event fires when a unit enters or leaves a distance around another unit. Use "Triggering Player" to get the player that was controlling the unit. Use "Triggering Unit" to get the unit.

Unit Enters/Leaves Region

  • This event fires when a unit enters or leaves a region. Use "Triggering Player" to get the player that was controlling the unit. Use "Triggering Region" to get the region that the unit either entered or left. Use "Triggering Unit" to get the unit.

Unit Gains Experience

  • This event fires when a unit gains experience. Use "Triggering Behavior" to get the behavior. Use "Triggering Experience Gained" to get the amount of experience. Use "Triggering Player" to get the owner of the unit that gained experience. Use "Triggering Unit" to get the unit that gained experience.

Unit Gains Experience Level

  • This event fires when a unit gains an experience level. Use "Triggering Behavior" to get the behavior. Use "Triggering Player" to get the owner of the unit that gained a level. Use "Triggering Unit" to get the unit that gained a level.

Unit Is Attacked

  • This event fires when a unit is attacked. Use "Attacking Unit" to refer to the unit performing the attack. Use "Triggering Unit" to refer to the unit being attacked. Use "Triggering Player" to get the owner of the unit being attacked.

Unit Is Being Removed

  • This event fires when a unit is removed from the game. Use "Triggering Player" to get the owner of the unit. Use "Triggering Unit" to get the unit.

Unit Is Created

  • This event fires when a unit is created. Use "Created Unit" to refer to the unit created. Use "Ability That Created Unit" to get the ability that created the unit. Use "Behavior That Created Unit" to get the behavior that created the unit.

Unit Is Healed

  • This event fires when a unit is healed through effects. Use "Healing Unit" to get the unit casting the heal. Use "Healing Player" to get the owner of the unit that is dealing damage. Use "Triggering Heal Given" to get the amount healed. Use "Triggering Heal Vital Type" to get the vital type that was healed. Use "Triggering Player" to get the owner of the unit that is healed. Use "Triggering Unit" to get the unit that is healed.

Unit Is Issued Order

  • This event fires when a unit is issued an order. Use "Triggering Order" to get the order. Use "Triggering Player" to get the player that issued the order. Use "Triggering Unit" to get the unit that was issued the order.

Unit Is Revived

  • This event fires when a unit is revived. Use "Triggering Unit" to get the unit that was revived.

Unit Learn Progress

  • This event fires when a unit's learning stage reaches a certain progress. Use "Triggering Player" to get the player that triggered construction. Use "Triggering Unit" to get the unit that is doing the learning. Use "Triggering Progress Ability" to get the ability being learned.

Unit Loads/Unloads Cargo

  • This event fires when a unit loads or unloads cargo. Use "Triggering Cargo Unit" to get the unit that was loaded or unloaded. Use "Triggering Player" to get the owner of the transport unit. Use "Triggering Unit" to get the transport unit.

Unit Manipulates Inventory

  • This event fires when a unit performs the specified action on the specified inventory item. Use "Triggering Inventory Item" to get the inventory item, "Triggering Inventory Item Container" to get the container the item resides in, "Triggering Inventory Item Slot" to get the slot the item occupies, "Triggering Inventory Item Target Point" to get the point targeted by the action, and "Triggering Inventory Item Target Unit" to get the unit targeted by the action.

Unit Owner Changes

  • This event fires when thw owning player of a unit changes. Use "Triggering Unit" to get the unit, and "Old Unit Owner" and "New Unit Owner" to get the old and new owners.

Unit Property Changes

  • This event fires when a unit's property changes. Use "Triggering Player" to get the owner of the unit whose property changed. Use "Triggering Unit" to get the unit whose property changed.

Unit Research Progress

  • This event fires when a unit's research progress reaches a certain point. Use "Triggering Player" to get the player that started the research. Use "Triggering Unit" to get the unit that is doing the research. Use "Triggering Progress Upgrade" to get the upgrade being researched.

Unit Revive Progress

  • This event fires when a unit's revive progress reaches a certain stage. Use "Triggering Player" to get the player that started the revive. Use "Triggering Unit" to get the unit doing the reviving. Use "Triggering Progress Unit Type" to get the unit type of the unit being revived. Use "Triggering Progress Unit" to get the unit being revived.

Unit Specialization Progress

  • This event fires when the unit's specialization progress reaches a specified point. Use "Triggering Player" to get the player that started the specialization. Use "Triggering Progress Effect" to get the effect that will run when specialization completes. Use "Triggering Unit" to get the unit doing the specializing.

Unit Starts Attacking

  • This event fires when a unit starts attacking. Use "Attacking Unit" or "Triggering Unit" to get the attacker. Use "Triggering Player" to get the owner of the attacker.

Unit Takes Damage

  • This event fires when a unit takes damage. Use "Damage Source Position" to get the position of the damage source. Use "Damaging Player" to get the owner of the unit that is dealing damage. Use "Damaging Unit" to get the unit that is dealing damage. Use "Triggering Damage Amount" to get the amount of damage being dealt. Use "Triggering Player" to get the owner of the unit that is taking damage. Use "Triggering Unit" to get the unit that is taking damage.

Unit Training Progress

  • This event fires when a unit's training progress reaches a certain stage. Use "Triggering Player" to get the player that started the training. Use "Triggering Unit" to get the unit doing the training. Use "Triggering Progress Unit Type" to get the unit type of the unit being trained. Use "Triggering Progress Unit" to get the unit being trained.

Unit Uses Ability

  • This event fires when a unit uses an ability. Use "Triggering Ability" to get the ability that was used. Use "Triggering Ability Stage" to get the stage the ability was in when the event fired. Use "Triggering Ability Target Point" to get the target point for the ability. Use "Triggering Ability Target Unit" to get the target unit for the ability. Use "Triggering Player" to get the player that used the ability. Use "Triggering Unit" to get the unit that used the ability.

Unit Is Clicked

  • This event fires when a unit is clicked by a player. Use "Triggering Unit" to refer to the unit being clicked. Use "Triggering Player" to get the player.

Unit Is Highlighted

  • This event fires when a unit is highlighted or unhighlighted by a player. Use "Triggering Unit" to refer to the unit being highlighted/unhighlighted. Use "Triggering Player" to get the player.

Unit Is Selected

This event fires when a unit is selected. Use "Triggering Unit" to refer to the unit being selected or deselected. Use "Triggering Player" to get the player that selected the unit.