Triggers/Category AI

From SC2Mapster Wiki
Jump to: navigation, search
Bot.png
Don't create new Links from this page Discuss
All Links here are being Corrected to match with the ones in Triggers/Functions#AI Triggers/Actions#AI

Contents

AttackWaves[edit | edit source]

Add Escort UnitType To Attack Wave[edit | edit source]

  • Action. Adds a unit of the specified unit type to the next attack wave for a player with orders to escort another unit.

Add Escort Unit To Attack Wave[edit | edit source]

  • Action. Adds a unit to the next attack wave for a player with orders to escort another unit.

Add Attack Wave Unit Types (Liberty/Swarm)[edit | edit source]

  • Action. Adds a type of unit to the next attack wave for a player; allowing you to specify a different number of units per difficulty level.

Add Attack Wave Waypoint[edit | edit source]

  • Action. Adds a waypoint to the next attack wave for a player. In Force Transport Mode, the wave units will attempt to load up in transports before approaching this waypoint. If there are not enough transports available for all of the units, the stranded units will be dropped from the wave.

Cancel Attack Wave[edit | edit source]

  • Action. Cancels an attack wave and sends the units back home.

Send Attack Wave[edit | edit source]

  • Action. Sends an attack wave for a player after the specified number of seconds has elapsed. If Wait is used, then the script will wait for the wave to be sent before continuing execution.

Set Attack Wave Gather Early No Replace[edit | edit source]

  • Action. Set the next attack wave from a player to gather immediately and not replace any units that die while gathering.

Set Attack Wave Gather Point[edit | edit source]

  • Action. Sets the point at which attack wave units will gather before being dispatched.

Set Attack Wave Keep Alive[edit | edit source]

  • Action. Set the next attack wave from a player to stay around even if it has only zero units in it. Only use this if you plan to manually keep track of the wave and add units later.

Set Target Escort For Attack Waves[edit | edit source]

  • Action. Sets the target of a player's attack waves to escort a unit group.

Set Target Escort For Attack Waves, No Leashing[edit | edit source]

  • Action. Sets the target of a player's attack waves to escort a unit group. The escorts will not break combat and return to their charge should they become seperated.

Set Target Gather Defense For Attack Waves[edit | edit source]

  • Action. Sets the target of a player's attack waves to a town's defensive gather point.

Set Target Gather Offense For Attack Waves[edit | edit source]

  • Action. Sets the target of a player's attack waves to a town's offensive gather point.

Set Target Melee For Attack Waves[edit | edit source]

  • Action. Sets the target of a player's attack waves to attack any enemies of that player.

Set Target Melee Harass For Attack Waves[edit | edit source]

  • Action. Sets the target of a player's attack waves to harass any enemies of that player.

Set Target Merge For Attack Waves[edit | edit source]

  • Action. Sets a wave to be the target of a player's attack waves. All of that player's attack waves will merge into the specified wave.

Set Target Patrol For Attack Waves[edit | edit source]

  • Action. Sets the target of a player's attack waves to patrol.

Set Target Player For Attack Waves[edit | edit source]

  • Action. Sets a player group to be the target of a player's attack waves.

Set Target Point For Attack Waves[edit | edit source]

  • Action. Sets a point to be the target of a player's attack waves.

Set Target Region For Attack/Defense Waves[edit | edit source]

  • Action. Sets the target of a player's attack (or defense) waves to a region.

Set Target Unit For Attack Waves[edit | edit source]

  • Action. Sets a unit to be the target of a player's attack waves.

Set Target UnitGroup For Attack Waves[edit | edit source]

  • Action. Sets a unit group to be the target of a player's attack waves.

Set Target UnitArea For Attack Waves[edit | edit source]

  • Action. Sets the position of a unit to be the target of a player's attack waves.

Add UnitGroup To Attack Wave[edit | edit source]

  • Action. Adds a unit group to the next attack wave for a player.

Add Unit To Attack Wave[edit | edit source]

  • Action. Adds a unit to the next attack wave for a player.

Last Created Wave[edit | edit source]

  • Function. Returns the last attack wave created by trigger script. This will get set after Send Attack Wave is called.

Bullies[edit | edit source]

Add New Bully[edit | edit source]

  • Action. Flags a pre-placed unit as a bully. The AI will rebuild units flagged as bullies if they are lost.

Remove All Bullies[edit | edit source]

  • Action. Removes the bully flag from all units owned by a player.

Limit Bully Rebuild To Nearest Town[edit | edit source]

  • Action. When enabled for a player, this makes it so that bullies for that player can only be replaced by unit producing structures in the town those bullies are closest to.

Limit Bully Wave Gather To Nearest Town[edit | edit source]

  • Action. When enabled for a player, this makes it so that bullies for that player can only be used in attack waves that are gathering near the town those bullies are closest to.

Reset Bully Rebuild Counts In Region[edit | edit source]

  • Action. Resets the rebuild counts for bullies owned by a specific player in a specific region.

Set Attack Wave Bully Percent[edit | edit source]

  • Action. Sets the percentage of bullies that are allowed to be used for attack waves for a player.

Set Rebuild Count (Default)[edit | edit source]

  • Action. Sets the maximum number of units or maximum number of buildings an AI player should rebuild. This only applies to preplaced units or buildings that do not have an individual rebuild count set.

Set Minimum Bully Count[edit | edit source]

  • Action. Sets the minimum number of bullies an AI player should maintain regardless of rebuild counts.

Set Rebuild Count (Specific)[edit | edit source]

  • Action. Sets the maximum number of a specific unit an AI player should rebuild. This only applies to preplaced units or buildings that do not have an individual rebuild count set.

Activate/Deactivate Bullies In Region[edit | edit source]

  • Action. If bullies are deactivated for a region, then that player will no longer rebuild bullies that were placed in that region.

MiscCampaign[edit | edit source]

Start Campaign AI For Player[edit | edit source]

  • Action. The campaign AI must be started for each player that uses AI triggers.

Issue AI Order[edit | edit source]

  • Action. Suggests an order to a unit. If the computer that controls the unit has the ability to execute the order (with respect to its current APM constraint), then it will do so. The order will eventually be dropped if the computer is unable to execute it for a few seconds after it was issued. If you need a unit to do something immediately, use Issue Order instead.

Global Suicide[edit | edit source]

  • Action. Flags all units owned by a player to suicide. Units flagged to suicide will seek out and attack the nearest enemy unit they can find until they are slain, or there is nothing left to attack.

Init Campaign Harvesting[edit | edit source]

  • Action. Initializes harvesting for an AI player. This happens automatically when you call one of the Start Campaign AI actions.

Init Campaign Towns[edit | edit source]

  • Action. Initializes the towns for an AI player. This happens automatically when you call one of the Start Campaign AI actions.

Remove Unit Group From All Waves[edit | edit source]

  • Action. Removes a group of units from any waves they are in.

Remove Unit Group From All Waves And Set Home[edit | edit source]

  • Action. Removes a group of units from any waves they are in and sets their home point.

Remove Unit From All Waves[edit | edit source]

  • Action. Removes a unit from any waves it is in.

Remove Unit From All Waves And Set Home[edit | edit source]

  • Action. Removes a unit from any waves it is in and sets its home point.

Enable/Disable Wave Use For Unit Group[edit | edit source]

  • Action. If wave use is disabled for a unit group, the AI will not use that unit in waves.

Enable/Disable Script Control For Unit Group[edit | edit source]

  • Action. If script control is enabled for a unit, the AI will not use that unit. Script-controlled bullies are not replaced unless they die.

Enable/Disable Suicide For Unit Group[edit | edit source]

  • Action. If suicide is enabled for a unit group, the AI will immediately seek out and repeatedly attack the nearest enemy until the suiciding unit group is destroyed. Setting a bully to suicide it will tag it as missing and cause the AI to rebuilt it, since it should not be returning alive.

Enable/Disable Wave Use For Unit[edit | edit source]

  • Action. If wave use is disabled for a unit, the AI will not use that unit in waves.

Enable/Disable Script Control For Unit[edit | edit source]

  • Action. If script control is enabled for a unit, the AI will not use that unit. Script-controlled bullies are not replaced unless they die.

Enable/Disable Suicide For Unit[edit | edit source]

  • Action. If suicide is enabled for a unit, the AI will immediately seek out and repeatedly attack the nearest enemy until the suiciding unit is destroyed. Setting a bully to suicide will tag it as missing and cause the AI to rebuild it, since it should not be returning alive.

Pause AI Time[edit | edit source]

  • Action. Pauses or unpauses the AI time. While paused, the controlling AI will idle. AI owned units will carry out their current actions, and then idle.

Start Campaign AI For All Players[edit | edit source]

  • Action. The campaign AI must be started for each player that uses AI triggers.

Escorts Of Unit[edit | edit source]

  • Function. Returns a group of all of the units assigned to escort a unit.

Escorts Of Unit Group[edit | edit source]

  • Function. Returns a group of all of the units assigned to escort a unit group.

Units In Waves With Target[edit | edit source]

  • Function. Returns a group of all the units owned by a player in any waves that are targeting the specified wave target.

Unit Is Unavailable For Wave Use[edit | edit source]

  • Function. Returns true if the unit is unusable by waves.

Unit Is Script Controlled[edit | edit source]

  • Function. Returns true if the unit is being controlled by scripts/triggers instead of by AI. This function only works for units owned by an AI player. Script-controlled units are not used by the AI for attack waves. Units that are issued orders via trigger actions are automatically marked as script-controlled. You can manually mark a unit as script-controlled using the Enable/Disable Script Control trigger actions.

Unit Is Suicidal[edit | edit source]

  • Function. Returns true if the unit is flagged as a suicide unit.

Random Spawn Point[edit | edit source]

  • Function. Returns a random point in the given region. Prefers to stay either close or far from enemies units. Also prefers to be within some max distance of enemy buildings. It will also stay away from previously returned random points in the region.

AI Time Is Paused[edit | edit source]

  • Function. Returns true if the AI time is paused.

Wave Of Unit[edit | edit source]

  • Function. Returns the wave a unit belongs to.

Units Of Wave[edit | edit source]

  • Function. Returns the group of units that belong to a wave.

Difficulty High[edit | edit source]

  • Function. Returns true if the current difficulty setting is this or harder. This is for campaign use (in which all players have the same difficulty setting), so player 1's setting is used.

Difficulty Is (one)[edit | edit source]

  • Function. Returns true if this is the current difficulty setting. This is for campaign use (in which all players have the same difficulty setting), so player 1's setting is used.

Difficulty Is (two)[edit | edit source]

  • Function. Returns true if the current difficulty setting is either of these. This is for campaign use (in which all players have the same difficulty setting), so player 1's setting is used.

Difficulty Low[edit | edit source]

  • Function. Returns true if the current difficulty setting is this or easier. This is for campaign use (in which all players have the same difficulty setting), so player 1's setting is used.

Difficulty Value (Real)[edit | edit source]

  • Function. Returns the real parameter that matches the current difficulty setting. This is for campaign use (in which all players have the same difficulty setting), so player 1's setting is used.

Difficulty Value (Integer)[edit | edit source]

  • Function. Returns the integer parameter that matches the current difficulty setting. This is for campaign use (in which all players have the same difficulty setting), so player 1's setting is used.

Difficulty Value (Unit Type)[edit | edit source]

  • Function. Returns the unit type parameter that matches the current difficulty setting. This is for campaign use (in which all players have the same difficulty setting), so player 1's setting is used.