# Same Command

Grammar — Tells unit secondUnit to do the same action unit firstUnit is currently doing
FlagsNative | Function

Tells a unit to do the same action that another is currently doing. Returns true if the action succeeded.

# Arguments

  • unit — First Unit
  • unit — Second Unit

Returns — bool

native bool AISameCommand(unit u1, unit u2);

Category: AI Advanced / Tactical / Functions

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TacticalAI.galaxy:267

        count = count - 1;

        if (AISameCommand(first, test)) {
            UnitGroupAdd(dst, test);
        }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TacticalAI.galaxy:267

        count = count - 1;

        if (AISameCommand(first, test)) {
            UnitGroupAdd(dst, test);
        }