Triggers/Category Unit Group

From SC2Mapster Wiki
Jump to: navigation, search

Groups[edit | edit source]

Add Unit Group To Unit Group[edit | edit source]

  • Action. Adds all the units in the source unit group to the target unit group.

Center Of Unit Group[edit | edit source]

  • Function. Returns the center of a group of units, defined as the average of their X and Y positions. Returns No Point if the unit group is empty.

Closest Unit To Point[edit | edit source]

  • Action. Picks the closest unit to the point specified in a unit group.

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

  • Action. Removes all the units in the source unit group from the target unit group.

Add Unit To Unit Group[edit | edit source]

  • Action. Adds the specified unit to the specified unit group.

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

  • Action. Removes all the units in the specified unit group.

Copy Of Unit Group[edit | edit source]

  • Action. Copies the specified unit group.

Number Of Units In Unit Group[edit | edit source]

  • Function. Returns the total number of units in the specified unit group.

Unit In Unit Group[edit | edit source]

  • Function. Returns true if the specified unit is part of the specified unit group.

Random Unit From Unit Group[edit | edit source]

  • Function. Returns a random unit from the specified unit group.

Remove Unit From Unit Group[edit | edit source]

  • Action. Removes the specified unit from the specified unit group.

Unit From Unit Group[edit | edit source]

  • Function. Returns a specific unit, by index, from the unit group. Use the "Number Of Units In Unit Group" function to determine how many units are in the unit group.

Loops[edit | edit source]

For Each Unit In Unit Group[edit | edit source]

  • Action. Runs the contained actions once for each unit in the unit group.

Pick Each Unit In Unit Group[edit | edit source]

  • Action. Runs the contained actions once for each unit in the unit group. Use the "Picked Unit" function to refer to the unit for which the actions are being run.

Picked Unit[edit | edit source]

  • Function. Returns the current unit picked in a "Pick Each Unit In Unit Group" loop.

Useful Unit Groups[edit | edit source]

Convert Unit To Unit Group[edit | edit source]

  • Action. Takes one unit and creates a unit group out of it.

Units In Region Matching Condition[edit | edit source]

  • Function. Returns a unit group containing all units that match the specified filters.

Units In Region With Alliance To Player[edit | edit source]

  • Function. Returns a unit group containing all units within the alliance filter specified.

Empty Unit Group[edit | edit source]

  • Function. Returns an empty unit group.

Units In Unit Group Matching Condition[edit | edit source]

  • Function. Returns a unit group that contains units that have passed the specified filters from another unit group.

Units In Unit Group With Alliance[edit | edit source]

  • Function. Returns a unit group that contains units that have passed the specified ally filters from another unit group.

Units In Unit Group Targetable As[edit | edit source]

  • Function. Returns a unit group that contains units that have passed the specified filters from another unit group.

Units In Unit Group For Player[edit | edit source]

  • Function. Returns a unit group by extracting units from a unit group belonging to the specified player.

Units In Unit Group Within Region[edit | edit source]

  • Function. Returns a unit group that contains units that are in a certain region from another unit group.

Idle Units For Player[edit | edit source]

  • Function. Returns a unit group that contains all of a player's idle units.