# Triggering Ability
Grammar — Triggering ability
Flags —Native
|Function
Returns the triggering ability. Used in response to “Unit Uses Ability”.
Returns — abilcmd
native abilcmd EventUnitAbility();
# Supported triggers
- Unit Uses Ability — TriggerAddEventUnitAbility
- Unit Changes Ability Auto Cast State — TriggerAddEventUnitAbilityAutoCastChange
# Related
Category: Ability / Basic
- Remove Ability —
void
— UnitAbilityRemove - Add Ability —
void
— UnitAbilityAdd - Unit Uses Ability —
void
— TriggerAddEventUnitAbility - Unit Changes Ability Auto Cast State —
void
— TriggerAddEventUnitAbilityAutoCastChange - Triggering Ability —
abilcmd
— EventUnitAbility - Triggering Ability Stage —
int
<preset::AbilityStage> — EventUnitAbilityStage - Triggering Ability Target Point —
point
— EventUnitTargetPoint - Triggering Ability Target Unit —
unit
— EventUnitTargetUnit - Triggering Ability Other Unit —
unit
— EventUnitAbilityOtherUnit - Ability From Item or Trigger —
abilcmd
— libNtve_gf_EventItemAbilityOrUnitAbility - Unit Is Created —
void
— TriggerAddEventUnitCreated - Created Unit —
unit
— EventUnitCreatedUnit - Behavior That Created Unit —
string
<gamelink::Behavior> — EventUnitCreatedBehavior - Ability That Created Unit —
string
<gamelink::Abil> — EventUnitCreatedAbil - Show/Hide Ability For Unit —
void
— UnitAbilityShow - Ability Enabled For Unit —
bool
— UnitAbilityCheck - Number Of Abilities On Unit —
int
— UnitAbilityCount - Unit Ability —
string
<gamelink::Abil> — UnitAbilityGet - Unit Ability By Class —
string
<gamelink::Abil> — libNtve_gf_UnitAbilityGetByType - Unit Ability Command State —
bool
— UnitCheckAbilCmdState - Unit Ability Order State (Flags) —
int
— UnitAbilOrderStateFlags - Unit Has Ability —
bool
— UnitAbilityExists - Enable/Disable Ability For Unit —
void
— UnitAbilityEnable - Add Level To Unit Ability —
void
— UnitAbilityChangeLevel - Replace Unit Ability —
void
— UnitAbilityChangeLink - Set Ability Default Submenu —
void
— UnitAbilityChangeCardId - Current Level For Unit Ability —
int
— UnitAbilityGetLevel - Maximum Level For Unit Ability —
int
— UnitAbilityMaxLevel - Ability Matches Filters —
bool
— libNtve_gf_AbilityMatchesFilters - Unit Ability By Filters —
string
<gamelink::Abil> — libNtve_gf_UnitAbilityByFilters - Unit Ability Default Submenu —
string
— UnitAbilityGetCardId
# Examples
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:17204
else {
}
if ((UnitGetType(EventUnit()) == "Probe") && (EventUnitAbility() == AbilityCommand("ProtossBuild", 1)) && (EventUnitAbilityStage() == c_abilBuildStageApproach)) {
if ((lv_gatewayValid1 == false) && (lv_gatewayValid2 == false)) {
TransmissionClearAll();
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/paiur06.sc2map/MapScript.galaxy:6150
}
if (!((EventUnitAbility() != AbilityCommand("SOARepairBeam", 0)))) {
return false;
}
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:17204
else {
}
if ((UnitGetType(EventUnit()) == "Probe") && (EventUnitAbility() == AbilityCommand("ProtossBuild", 1)) && (EventUnitAbilityStage() == c_abilBuildStageApproach)) {
if ((lv_gatewayValid1 == false) && (lv_gatewayValid2 == false)) {
TransmissionClearAll();
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur06.sc2map — MapScript.galaxy:6150
}
if (!((EventUnitAbility() != AbilityCommand("SOARepairBeam", 0)))) {
return false;
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:10899
}
if (((EventUnitAbility() == AbilityCommand("Blink", 0)) || (EventUnitAbility() == AbilityCommand("TimeWarp", 0)))) {
DataTableSetInt(true, ("AbilUsed_" + (AbilityCommandGetAbility(EventUnitAbility()))), (DataTableGetInt(true, ("AbilUsed_" + (AbilityCommandGetAbility(EventUnitAbility()))))+1));
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:10899
}
if (((EventUnitAbility() == AbilityCommand("Blink", 0)) || (EventUnitAbility() == AbilityCommand("TimeWarp", 0)))) {
DataTableSetInt(true, ("AbilUsed_" + (AbilityCommandGetAbility(EventUnitAbility()))), (DataTableGetInt(true, ("AbilUsed_" + (AbilityCommandGetAbility(EventUnitAbility()))))+1));
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:10900
if (((EventUnitAbility() == AbilityCommand("Blink", 0)) || (EventUnitAbility() == AbilityCommand("TimeWarp", 0)))) {
DataTableSetInt(true, ("AbilUsed_" + (AbilityCommandGetAbility(EventUnitAbility()))), (DataTableGetInt(true, ("AbilUsed_" + (AbilityCommandGetAbility(EventUnitAbility()))))+1));
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:10900
if (((EventUnitAbility() == AbilityCommand("Blink", 0)) || (EventUnitAbility() == AbilityCommand("TimeWarp", 0)))) {
DataTableSetInt(true, ("AbilUsed_" + (AbilityCommandGetAbility(EventUnitAbility()))), (DataTableGetInt(true, ("AbilUsed_" + (AbilityCommandGetAbility(EventUnitAbility()))))+1));
}
mods/balancemulti.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:214
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserMove", 0)))) {
return false;
}
mods/balancemulti.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:218
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserAttack", 0)))) {
return false;
}
mods/balancemulti.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:222
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserMove", 2)))) {
return false;
}
mods/balancemulti.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:226
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserStop", 0)))) {
return false;
}
mods/balancemultilanmethodcleanedup.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:214
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserMove", 0)))) {
return false;
}
mods/balancemultilanmethodcleanedup.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:218
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserAttack", 0)))) {
return false;
}
mods/balancemultilanmethodcleanedup.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:222
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserMove", 2)))) {
return false;
}
mods/balancemultilanmethodcleanedup.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:226
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserStop", 0)))) {
return false;
}
mods/balancemultislowwarpprism.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:214
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserMove", 0)))) {
return false;
}
mods/balancemultislowwarpprism.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:218
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserAttack", 0)))) {
return false;
}
mods/balancemultislowwarpprism.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:222
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserMove", 2)))) {
return false;
}
mods/balancemultislowwarpprism.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:226
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserStop", 0)))) {
return false;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:133
// Variable Initialization
lv_otherUnit = EventUnitAbilityOtherUnit();
lv_abilUsed = EventUnitAbility();
lv_itemType = "";
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:10160
// Automatic Variable Declarations
// Variable Initialization
lv_abilityCommand = EventUnitAbility();
lv_unit = EventUnit();
lv_heroType = UnitGetType(lv_unit);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:14195
}
if (!((EventUnitAbility() != AbilityCommand("LostVikingsRally", 0)))) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:14199
}
if (!((EventUnitAbility() != AbilityCommand("LostVikingsBaleogRally", 0)))) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:14203
}
if (!((EventUnitAbility() != AbilityCommand("LostVikingsOlafRally", 0)))) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:14207
}
if (!((EventUnitAbility() != AbilityCommand("LostVikingsErikRally", 0)))) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:26096
}
if (!((AbilityCommandGetAbility(AbilityCommand("BarbarianShotofFury", 0)) != AbilityCommandGetAbility(EventUnitAbility())))) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:26100
}
if (!((AbilityCommandGetAbility(AbilityCommand("BarbarianAncientSpear", 0)) != AbilityCommandGetAbility(EventUnitAbility())))) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:26104
}
if (!((AbilityCommandGetAbility(AbilityCommand("L90ETCPowerslide", 0)) != AbilityCommandGetAbility(EventUnitAbility())))) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:26119
for ( ; ( (auto98ECC35E_ai >= 0 && lv_i <= auto98ECC35E_ae) || (auto98ECC35E_ai < 0 && lv_i >= auto98ECC35E_ae) ) ; lv_i += auto98ECC35E_ai ) {
lv_abilLink = libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_i].lv_ability;
if ((lv_abilLink == AbilityCommandGetAbility(EventUnitAbility()))) {
UnitBehaviorAdd(lv_hero, "TalentBucketFollowThrough", lv_hero, 1);
break;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/SupportLib.galaxy:4499
}
libSprt_gv_soundRepeatCurrentAbility = AbilityCommandGetAbility(EventUnitAbility());
libSprt_gv_soundRepeatCasterUnit = EventUnit();
libSprt_gv_soundRepeatTargetUnit = EventUnit();
mods/heromods/dva.stormmod — base.stormdata/LibHDVA.galaxy:1379
// Variable Initialization
lv_stage = c_unitAbilStageAll;
lv_ability = EventUnitAbility();
// Conditions
mods/heromods/samuro.stormmod — base.stormdata/LibHSAM.galaxy:910
if (lv_itUnit == null) { break; }
if ((lv_itUnit != EventUnit())) {
UnitIssueOrder(lv_itUnit, Order(EventUnitAbility()), c_orderQueueReplace);
}
mods/heromods/samuro.stormmod — base.stormdata/LibHSAM.galaxy:1472
lv_samuroPlayer = UnitGetOwner(EventUnit());
if ((PlayerHasTalent(lv_samuroPlayer, "SamuroWhirlwindStorm") == true) && (EventUnitAbility() == AbilityCommand("SamuroBladeStormDummy", 0))) {
auto1ACCA2DA_g = libGame_gv_players[lv_samuroPlayer].lv_heroUnitGroup;
auto1ACCA2DA_u = UnitGroupCount(auto1ACCA2DA_g, c_unitCountAll);
mods/heromods/samuro.stormmod — base.stormdata/LibHSAM.galaxy:1484
}
else {
if ((PlayerHasTalent(lv_samuroPlayer, "SamuroWhirlwindStorm") == true) && (EventUnitAbility() == AbilityCommand("SamuroBladestormCancel", 0))) {
auto022C31C7_g = libGame_gv_players[lv_samuroPlayer].lv_heroUnitGroup;
auto022C31C7_u = UnitGroupCount(auto022C31C7_g, c_unitCountAll);
mods/heromods/samuro.stormmod — base.stormdata/LibHSAM.galaxy:1494
}
else {
if ((EventUnitAbility() == AbilityCommand("SamuroBladeStormDummy", 0))) {
UnitIssueOrder(EventUnit(), Order(AbilityCommand("SamuroBladestorm", 0)), c_orderQueueReplace);
}
mods/heromods/tracer.stormmod — base.stormdata/LibTrac.galaxy:705
// Automatic Variable Declarations
// Variable Initialization
lv_ability = EventUnitAbility();
// Conditions
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:17042
}
if ((libCOMI_gf_HeroCanSpendSkillPoint(lv_u, AbilityCommandGetAbility(EventUnitAbility())) == true)) {
ActorSend(libNtve_gf_MainActorofUnit(lv_u), "HaloStart");
UISetButtonFaceHighlighted(PlayerGroupSingle(UnitGetOwner(lv_u)), "DehakaLearnAbilities", true);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:17398
}
autoE74B4F8A_val = EventUnitAbility();
if (autoE74B4F8A_val == AbilityCommand("DehakaGlevigFirebreath", 0)) {
libCOMI_gv_dehakaGlevigFirebreathAutocast[EventPlayer()] = true;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:17434
}
auto80035AF7_val = EventUnitAbility();
if (auto80035AF7_val == AbilityCommand("DehakaGlevigFirebreath", 0)) {
libCOMI_gv_dehakaGlevigFirebreathAutocast[EventPlayer()] = false;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:19383
}
auto1242C3A3_val = EventUnitAbility();
if (auto1242C3A3_val == AbilityCommand("FenixSoAWhirlwind", 0)) {
libCOMI_gv_fenixWhirlwindAutocast[EventPlayer()] = true;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:19415
}
auto603B686C_val = EventUnitAbility();
if (auto603B686C_val == AbilityCommand("FenixSoAWhirlwind", 0)) {
libCOMI_gv_fenixWhirlwindAutocast[EventPlayer()] = false;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:25903
// Variable Initialization
lv_p = EventPlayer();
lv_uT = libCOMI_gf_TraingingUnitTypeInAbilCommand(EventUnitAbility(), lv_p, 0);
// Actions
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:25937
// Variable Initialization
lv_p = EventPlayer();
lv_uT = libCOMI_gf_TraingingUnitTypeInAbilCommand(EventUnitAbility(), lv_p, 0);
// Actions
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:31793
}
if ((libCOMI_gf_HeroCanSpendSkillPoint(EventUnit(), AbilityCommandGetAbility(EventUnitAbility())) == false)) {
libNtve_gf_StopTimer(libCOMI_gv_cM_DehakaVOLearnReminderTimer);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:13996
}
autoCD529328_val = EventUnitAbility();
if (autoCD529328_val == AbilityCommand("MutatorBoomBotDefuse", 0)) {
lv_input = 1;
mods/voidmulti.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:214
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserMove", 0)))) {
return false;
}
mods/voidmulti.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:218
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserAttack", 0)))) {
return false;
}
mods/voidmulti.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:222
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserMove", 2)))) {
return false;
}
mods/voidmulti.sc2mod — base.sc2data/TriggerLibs/VoidMultiLib.galaxy:226
}
if (!((EventUnitAbility() != AbilityCommand("BattlecruiserStop", 0)))) {
return false;
}
mods/warcoop/legends/jainaproudmoore.sc2mod — base.sc2data/LibLJai.galaxy:29
// Conditions
if (testConds) {
if (!((CatalogFieldValueGet(c_gameCatalogAbil, AbilityCommandGetAbility(EventUnitAbility()), "AbilityCategories[" + IntToString(0) + "]", c_playerAny) == "1"))) {
return false;
}