# Unit Starts Attacking (Deprecated)

Grammaru starts attacking
FlagsNative | Event | Hidden

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.

# Arguments

  • unitref<unit> — Unit

Returns — void

native void TriggerAddEventUnitStartedAttack(
	trigger t,
	unitref u,
);

# Event parameters

Category: Unit / Combat

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson01.sc2map/MapScript.galaxy:2685

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:864

void gt_WarehouseBullies1_Init () {
    gt_WarehouseBullies1 = TriggerCreate("gt_WarehouseBullies1_Func");
    TriggerAddEventUnitStartedAttack(gt_WarehouseBullies1, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:969

void gt_WarehouseBullies3_Init () {
    gt_WarehouseBullies3 = TriggerCreate("gt_WarehouseBullies3_Func");
    TriggerAddEventUnitStartedAttack(gt_WarehouseBullies3, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:2490

void gt_ParadePlazaReaction_Init () {
    gt_ParadePlazaReaction = TriggerCreate("gt_ParadePlazaReaction_Func");
    TriggerAddEventUnitStartedAttack(gt_ParadePlazaReaction, null);
    TriggerAddEventUnitAbility(gt_ParadePlazaReaction, null, AbilityCommand("OdinBarrage", 255), c_unitAbilStageExecute, false);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:5121

void gt_TransmissionOdinNearReaperQ_Init () {
    gt_TransmissionOdinNearReaperQ = TriggerCreate("gt_TransmissionOdinNearReaperQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionOdinNearReaperQ, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:5174

void gt_TransmissionOdinNearSiegeTankQ_Init () {
    gt_TransmissionOdinNearSiegeTankQ = TriggerCreate("gt_TransmissionOdinNearSiegeTankQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionOdinNearSiegeTankQ, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:5227

void gt_TransmissionOdinNearVikingQ_Init () {
    gt_TransmissionOdinNearVikingQ = TriggerCreate("gt_TransmissionOdinNearVikingQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionOdinNearVikingQ, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:8573

void gt_EscapeDialogueAutoBotAttackingLetsMoveQ_Init () {
    gt_EscapeDialogueAutoBotAttackingLetsMoveQ = TriggerCreate("gt_EscapeDialogueAutoBotAttackingLetsMoveQ_Func");
    TriggerAddEventUnitStartedAttack(gt_EscapeDialogueAutoBotAttackingLetsMoveQ, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor03.sc2map/MapScript.galaxy:3377

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:1018

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus02.sc2map/MapScript.galaxy:1773

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus05.sc2map/MapScript.galaxy:791

void gt_PlayerIsInCombatattacking_Init () {
    gt_PlayerIsInCombatattacking = TriggerCreate("gt_PlayerIsInCombatattacking_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombatattacking, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02b.sc2map/MapScript.galaxy:1055

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:7428

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul02.sc2map/MapScript.galaxy:813

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson01.sc2mapMapScript.galaxy:2685

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner03.sc2mapMapScript.galaxy:864

void gt_WarehouseBullies1_Init () {
    gt_WarehouseBullies1 = TriggerCreate("gt_WarehouseBullies1_Func");
    TriggerAddEventUnitStartedAttack(gt_WarehouseBullies1, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner03.sc2mapMapScript.galaxy:969

void gt_WarehouseBullies3_Init () {
    gt_WarehouseBullies3 = TriggerCreate("gt_WarehouseBullies3_Func");
    TriggerAddEventUnitStartedAttack(gt_WarehouseBullies3, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:2490

void gt_ParadePlazaReaction_Init () {
    gt_ParadePlazaReaction = TriggerCreate("gt_ParadePlazaReaction_Func");
    TriggerAddEventUnitStartedAttack(gt_ParadePlazaReaction, null);
    TriggerAddEventUnitAbility(gt_ParadePlazaReaction, null, AbilityCommand("OdinBarrage", 255), c_unitAbilStageExecute, false);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:5121

void gt_TransmissionOdinNearReaperQ_Init () {
    gt_TransmissionOdinNearReaperQ = TriggerCreate("gt_TransmissionOdinNearReaperQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionOdinNearReaperQ, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:5174

void gt_TransmissionOdinNearSiegeTankQ_Init () {
    gt_TransmissionOdinNearSiegeTankQ = TriggerCreate("gt_TransmissionOdinNearSiegeTankQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionOdinNearSiegeTankQ, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:5227

void gt_TransmissionOdinNearVikingQ_Init () {
    gt_TransmissionOdinNearVikingQ = TriggerCreate("gt_TransmissionOdinNearVikingQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionOdinNearVikingQ, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner05s.sc2mapMapScript.galaxy:8573

void gt_EscapeDialogueAutoBotAttackingLetsMoveQ_Init () {
    gt_EscapeDialogueAutoBotAttackingLetsMoveQ = TriggerCreate("gt_EscapeDialogueAutoBotAttackingLetsMoveQ_Func");
    TriggerAddEventUnitStartedAttack(gt_EscapeDialogueAutoBotAttackingLetsMoveQ, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/traynor03.sc2mapMapScript.galaxy:3377

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:1018

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus02.sc2mapMapScript.galaxy:1773

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus05.sc2mapMapScript.galaxy:791

void gt_PlayerIsInCombatattacking_Init () {
    gt_PlayerIsInCombatattacking = TriggerCreate("gt_PlayerIsInCombatattacking_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombatattacking, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02b.sc2mapMapScript.galaxy:1055

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul01.sc2mapMapScript.galaxy:7428

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul02.sc2mapMapScript.galaxy:813

void gt_PlayerIsInCombat_Init () {
    gt_PlayerIsInCombat = TriggerCreate("gt_PlayerIsInCombat_Func");
    TriggerAddEventUnitStartedAttack(gt_PlayerIsInCombat, null);
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zchar03.sc2map/MapScript.galaxy:1621

void gt_StartTimedAttackTimer_Init () {
    gt_StartTimedAttackTimer = TriggerCreate("gt_StartTimedAttackTimer_Func");
    TriggerAddEventUnitStartedAttack(gt_StartTimedAttackTimer, null);
    TriggerAddEventUnitAbility(gt_StartTimedAttackTimer, UnitRefFromVariable("gv_tHEONEKERRIGAN"), null, c_unitAbilStageExecute, false);
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zexpedition03.sc2map/MapScript.galaxy:4195

void gt_SentryInitiatesCleansing_Init () {
    gt_SentryInitiatesCleansing = TriggerCreate("gt_SentryInitiatesCleansing_Func");
    TriggerAddEventUnitStartedAttack(gt_SentryInitiatesCleansing, UnitRefFromUnit(UnitFromId(409)));
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zexpedition03.sc2map/MapScript.galaxy:6364

void gt_TransmissionP5StalkerRushQ_Init () {
    gt_TransmissionP5StalkerRushQ = TriggerCreate("gt_TransmissionP5StalkerRushQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionP5StalkerRushQ, UnitRefFromUnit(UnitFromId(530)));
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zexpedition03.sc2map/MapScript.galaxy:6565

void gt_TransmissionP5EscapePod03DefenseQ_Init () {
    gt_TransmissionP5EscapePod03DefenseQ = TriggerCreate("gt_TransmissionP5EscapePod03DefenseQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionP5EscapePod03DefenseQ, UnitRefFromUnit(UnitFromId(354)));
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zexpedition03.sc2map/MapScript.galaxy:6797

void gt_TransmissionP5EscapePod04DefenseQ_Init () {
    gt_TransmissionP5EscapePod04DefenseQ = TriggerCreate("gt_TransmissionP5EscapePod04DefenseQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionP5EscapePod04DefenseQ, UnitRefFromUnit(UnitFromId(356)));
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zexpedition03.sc2map/MapScript.galaxy:6903

void gt_TransmissionP5ProtossEndQ_Init () {
    gt_TransmissionP5ProtossEndQ = TriggerCreate("gt_TransmissionP5ProtossEndQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionP5ProtossEndQ, UnitRefFromUnit(UnitFromId(626)));
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zkorhal02.sc2map/MapScript.galaxy:1813

void gt_TransmissionStrangeCreatureQ_Init () {
    gt_TransmissionStrangeCreatureQ = TriggerCreate("gt_TransmissionStrangeCreatureQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionStrangeCreatureQ, UnitRefFromUnit(UnitFromId(516)));
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab02.sc2map/MapScript.galaxy:7999

    gt_TransmissionSiegeTanksQ = TriggerCreate("gt_TransmissionSiegeTanksQ_Func");
    TriggerEnable(gt_TransmissionSiegeTanksQ, false);
    TriggerAddEventUnitStartedAttack(gt_TransmissionSiegeTanksQ, null);
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab03.sc2map/MapScript.galaxy:6526

void gt_BottomMarinesReaction_Init () {
    gt_BottomMarinesReaction = TriggerCreate("gt_BottomMarinesReaction_Func");
    TriggerAddEventUnitStartedAttack(gt_BottomMarinesReaction, UnitRefFromVariable("gv_dominionFlavorMarine"));
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab03.sc2map/MapScript.galaxy:6646

void gt_TransmissionMainBaseInvasionQ_Init () {
    gt_TransmissionMainBaseInvasionQ = TriggerCreate("gt_TransmissionMainBaseInvasionQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionMainBaseInvasionQ, UnitRefFromUnit(UnitFromId(347)));
    TriggerAddEventUnitStartedAttack(gt_TransmissionMainBaseInvasionQ, UnitRefFromUnit(UnitFromId(346)));
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab03.sc2map/MapScript.galaxy:6647

    gt_TransmissionMainBaseInvasionQ = TriggerCreate("gt_TransmissionMainBaseInvasionQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionMainBaseInvasionQ, UnitRefFromUnit(UnitFromId(347)));
    TriggerAddEventUnitStartedAttack(gt_TransmissionMainBaseInvasionQ, UnitRefFromUnit(UnitFromId(346)));
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab03.sc2map/MapScript.galaxy:7114

    gt_HellionBattleModeEnabled = TriggerCreate("gt_HellionBattleModeEnabled_Func");
    TriggerEnable(gt_HellionBattleModeEnabled, false);
    TriggerAddEventUnitStartedAttack(gt_HellionBattleModeEnabled, null);
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zchar03.sc2mapMapScript.galaxy:1621

void gt_StartTimedAttackTimer_Init () {
    gt_StartTimedAttackTimer = TriggerCreate("gt_StartTimedAttackTimer_Func");
    TriggerAddEventUnitStartedAttack(gt_StartTimedAttackTimer, null);
    TriggerAddEventUnitAbility(gt_StartTimedAttackTimer, UnitRefFromVariable("gv_tHEONEKERRIGAN"), null, c_unitAbilStageExecute, false);
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition03.sc2mapMapScript.galaxy:4195

void gt_SentryInitiatesCleansing_Init () {
    gt_SentryInitiatesCleansing = TriggerCreate("gt_SentryInitiatesCleansing_Func");
    TriggerAddEventUnitStartedAttack(gt_SentryInitiatesCleansing, UnitRefFromUnit(UnitFromId(409)));
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition03.sc2mapMapScript.galaxy:6364

void gt_TransmissionP5StalkerRushQ_Init () {
    gt_TransmissionP5StalkerRushQ = TriggerCreate("gt_TransmissionP5StalkerRushQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionP5StalkerRushQ, UnitRefFromUnit(UnitFromId(530)));
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition03.sc2mapMapScript.galaxy:6565

void gt_TransmissionP5EscapePod03DefenseQ_Init () {
    gt_TransmissionP5EscapePod03DefenseQ = TriggerCreate("gt_TransmissionP5EscapePod03DefenseQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionP5EscapePod03DefenseQ, UnitRefFromUnit(UnitFromId(354)));
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition03.sc2mapMapScript.galaxy:6797

void gt_TransmissionP5EscapePod04DefenseQ_Init () {
    gt_TransmissionP5EscapePod04DefenseQ = TriggerCreate("gt_TransmissionP5EscapePod04DefenseQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionP5EscapePod04DefenseQ, UnitRefFromUnit(UnitFromId(356)));
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition03.sc2mapMapScript.galaxy:6903

void gt_TransmissionP5ProtossEndQ_Init () {
    gt_TransmissionP5ProtossEndQ = TriggerCreate("gt_TransmissionP5ProtossEndQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionP5ProtossEndQ, UnitRefFromUnit(UnitFromId(626)));
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal02.sc2mapMapScript.galaxy:1813

void gt_TransmissionStrangeCreatureQ_Init () {
    gt_TransmissionStrangeCreatureQ = TriggerCreate("gt_TransmissionStrangeCreatureQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionStrangeCreatureQ, UnitRefFromUnit(UnitFromId(516)));
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab02.sc2mapMapScript.galaxy:7999

    gt_TransmissionSiegeTanksQ = TriggerCreate("gt_TransmissionSiegeTanksQ_Func");
    TriggerEnable(gt_TransmissionSiegeTanksQ, false);
    TriggerAddEventUnitStartedAttack(gt_TransmissionSiegeTanksQ, null);
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab03.sc2mapMapScript.galaxy:6526

void gt_BottomMarinesReaction_Init () {
    gt_BottomMarinesReaction = TriggerCreate("gt_BottomMarinesReaction_Func");
    TriggerAddEventUnitStartedAttack(gt_BottomMarinesReaction, UnitRefFromVariable("gv_dominionFlavorMarine"));
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab03.sc2mapMapScript.galaxy:6646

void gt_TransmissionMainBaseInvasionQ_Init () {
    gt_TransmissionMainBaseInvasionQ = TriggerCreate("gt_TransmissionMainBaseInvasionQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionMainBaseInvasionQ, UnitRefFromUnit(UnitFromId(347)));
    TriggerAddEventUnitStartedAttack(gt_TransmissionMainBaseInvasionQ, UnitRefFromUnit(UnitFromId(346)));
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab03.sc2mapMapScript.galaxy:6647

    gt_TransmissionMainBaseInvasionQ = TriggerCreate("gt_TransmissionMainBaseInvasionQ_Func");
    TriggerAddEventUnitStartedAttack(gt_TransmissionMainBaseInvasionQ, UnitRefFromUnit(UnitFromId(347)));
    TriggerAddEventUnitStartedAttack(gt_TransmissionMainBaseInvasionQ, UnitRefFromUnit(UnitFromId(346)));
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab03.sc2mapMapScript.galaxy:7114

    gt_HellionBattleModeEnabled = TriggerCreate("gt_HellionBattleModeEnabled_Func");
    TriggerEnable(gt_HellionBattleModeEnabled, false);
    TriggerAddEventUnitStartedAttack(gt_HellionBattleModeEnabled, null);
}