# Unit Changes Ability Auto Cast State

Grammarunit changes ability Auto Cast state change (includeSharedAbilities|Include/Ignore shared abilities)
FlagsNative | Event

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).

# Arguments

Returns — void

native void TriggerAddEventUnitAbilityAutoCastChange(
	trigger t,
	unitref u,
	abilcmd a,
	int inChangeType,
	bool includeSharedAbils,
);

# Event parameters

Category: Ability / Basic

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:17417

    libCOMI_gt_CM_DehakaAutocastSettingsOn = TriggerCreate("libCOMI_gt_CM_DehakaAutocastSettingsOn_Func");
    TriggerEnable(libCOMI_gt_CM_DehakaAutocastSettingsOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOn, null, AbilityCommand("DehakaGlevigFirebreath", 0), c_unitAbilAutoCastChangeOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOn, null, AbilityCommand("MurvarCoopPuke", 0), c_unitAbilAutoCastChangeOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOn, null, AbilityCommand("CoopMurvarSpawnCreepers", 0), c_unitAbilAutoCastChangeOn, false);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:17418

    TriggerEnable(libCOMI_gt_CM_DehakaAutocastSettingsOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOn, null, AbilityCommand("DehakaGlevigFirebreath", 0), c_unitAbilAutoCastChangeOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOn, null, AbilityCommand("MurvarCoopPuke", 0), c_unitAbilAutoCastChangeOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOn, null, AbilityCommand("CoopMurvarSpawnCreepers", 0), c_unitAbilAutoCastChangeOn, false);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:17419

    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOn, null, AbilityCommand("DehakaGlevigFirebreath", 0), c_unitAbilAutoCastChangeOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOn, null, AbilityCommand("MurvarCoopPuke", 0), c_unitAbilAutoCastChangeOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOn, null, AbilityCommand("CoopMurvarSpawnCreepers", 0), c_unitAbilAutoCastChangeOn, false);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:17453

    libCOMI_gt_CM_DehakaAutocastSettingsOff = TriggerCreate("libCOMI_gt_CM_DehakaAutocastSettingsOff_Func");
    TriggerEnable(libCOMI_gt_CM_DehakaAutocastSettingsOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOff, null, AbilityCommand("DehakaGlevigFirebreath", 0), c_unitAbilAutoCastChangeOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOff, null, AbilityCommand("MurvarCoopPuke", 0), c_unitAbilAutoCastChangeOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOff, null, AbilityCommand("CoopMurvarSpawnCreepers", 0), c_unitAbilAutoCastChangeOff, false);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:17454

    TriggerEnable(libCOMI_gt_CM_DehakaAutocastSettingsOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOff, null, AbilityCommand("DehakaGlevigFirebreath", 0), c_unitAbilAutoCastChangeOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOff, null, AbilityCommand("MurvarCoopPuke", 0), c_unitAbilAutoCastChangeOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOff, null, AbilityCommand("CoopMurvarSpawnCreepers", 0), c_unitAbilAutoCastChangeOff, false);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:17455

    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOff, null, AbilityCommand("DehakaGlevigFirebreath", 0), c_unitAbilAutoCastChangeOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOff, null, AbilityCommand("MurvarCoopPuke", 0), c_unitAbilAutoCastChangeOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_DehakaAutocastSettingsOff, null, AbilityCommand("CoopMurvarSpawnCreepers", 0), c_unitAbilAutoCastChangeOff, false);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:19399

    libCOMI_gt_CM_FenixAutocastSettingsOn = TriggerCreate("libCOMI_gt_CM_FenixAutocastSettingsOn_Func");
    TriggerEnable(libCOMI_gt_CM_FenixAutocastSettingsOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_FenixAutocastSettingsOn, null, AbilityCommand("FenixSoAWhirlwind", 0), c_unitAbilAutoCastChangeOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_FenixAutocastSettingsOn, null, AbilityCommand("VoidShieldCapacitor", 0), c_unitAbilAutoCastChangeOn, false);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:19400

    TriggerEnable(libCOMI_gt_CM_FenixAutocastSettingsOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_FenixAutocastSettingsOn, null, AbilityCommand("FenixSoAWhirlwind", 0), c_unitAbilAutoCastChangeOn, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_FenixAutocastSettingsOn, null, AbilityCommand("VoidShieldCapacitor", 0), c_unitAbilAutoCastChangeOn, false);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:19431

    libCOMI_gt_CM_FenixAutocastSettingsOff = TriggerCreate("libCOMI_gt_CM_FenixAutocastSettingsOff_Func");
    TriggerEnable(libCOMI_gt_CM_FenixAutocastSettingsOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_FenixAutocastSettingsOff, null, AbilityCommand("FenixSoAWhirlwind", 0), c_unitAbilAutoCastChangeOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_FenixAutocastSettingsOff, null, AbilityCommand("VoidShieldCapacitor", 0), c_unitAbilAutoCastChangeOff, false);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:19432

    TriggerEnable(libCOMI_gt_CM_FenixAutocastSettingsOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_FenixAutocastSettingsOff, null, AbilityCommand("FenixSoAWhirlwind", 0), c_unitAbilAutoCastChangeOff, false);
    TriggerAddEventUnitAbilityAutoCastChange(libCOMI_gt_CM_FenixAutocastSettingsOff, null, AbilityCommand("VoidShieldCapacitor", 0), c_unitAbilAutoCastChangeOff, false);
}