# Enable/Disable Ability For Unit

Grammarenable|Enable/Disable the abil ability for u
FlagsNative | Action

Enables or disables an ability on a unit.

# Arguments

Returns — void

native void UnitAbilityEnable(
	unit inUnit,
	string inAbil,
	bool inEnable,
);

Category: Ability / Basic

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L326
UnitAbilityEnable(UnitFromId(2), "OdinBarrage", false)
// L2528
UnitAbilityEnable(UnitFromId(2), "OdinBarrage", true)
// L2773
UnitAbilityEnable(UnitFromId(2), "OdinBarrage", true)
// L3049
UnitAbilityEnable(UnitFromId(2), "OdinBarrage", true)
// L3515
UnitAbilityEnable(UnitFromId(2), "OdinBarrage", true)
// L837
UnitAbilityEnable(gv_turret01, "SentryGunBurrow", false)
// L838
UnitAbilityEnable(gv_turret02, "SentryGunBurrow", false)
// L839
UnitAbilityEnable(gv_turret03, "SentryGunBurrow", false)
// L840
UnitAbilityEnable(gv_turret04, "SentryGunBurrow", false)
// L841
UnitAbilityEnable(gv_turret05, "SentryGunBurrow", false)
// L842
UnitAbilityEnable(gv_turret06, "SentryGunBurrow", false)
// L860
UnitAbilityEnable(gv_turret07, "SentryGunBurrow", false)
// L861
UnitAbilityEnable(gv_turret08, "SentryGunBurrow", false)
// L862
UnitAbilityEnable(gv_turret09, "SentryGunBurrow", false)
// L863
UnitAbilityEnable(UnitFromId(2387), "SentryGunBurrow", false)
// L1019
UnitAbilityEnable(auto0861DDE7_var, "BurrowInfestedTerranCampaignDown", false)
// L3500
UnitAbilityEnable(gv_kerrigan, "Implosion", true)
// L3501
UnitAbilityEnable(gv_kerrigan, "OmegaStorm", true)
// L3821
UnitAbilityEnable(gv_kerrigan, "OmegaStorm", false)
// L3823
UnitAbilityEnable(gv_kerrigan, "OmegaStorm", true)
// L3843
UnitAbilityEnable(gv_kerrigan, "Implosion", false)
// L3845
UnitAbilityEnable(gv_kerrigan, "Implosion", true)
// L326
UnitAbilityEnable(UnitFromId(2), "OdinBarrage", false)
// L2528
UnitAbilityEnable(UnitFromId(2), "OdinBarrage", true)
// L2773
UnitAbilityEnable(UnitFromId(2), "OdinBarrage", true)
// L3049
UnitAbilityEnable(UnitFromId(2), "OdinBarrage", true)
// L3515
UnitAbilityEnable(UnitFromId(2), "OdinBarrage", true)
// L837
UnitAbilityEnable(gv_turret01, "SentryGunBurrow", false)
// L838
UnitAbilityEnable(gv_turret02, "SentryGunBurrow", false)
// L839
UnitAbilityEnable(gv_turret03, "SentryGunBurrow", false)
// L840
UnitAbilityEnable(gv_turret04, "SentryGunBurrow", false)
// L841
UnitAbilityEnable(gv_turret05, "SentryGunBurrow", false)
// L842
UnitAbilityEnable(gv_turret06, "SentryGunBurrow", false)
// L860
UnitAbilityEnable(gv_turret07, "SentryGunBurrow", false)
// L861
UnitAbilityEnable(gv_turret08, "SentryGunBurrow", false)
// L862
UnitAbilityEnable(gv_turret09, "SentryGunBurrow", false)
// L863
UnitAbilityEnable(UnitFromId(2387), "SentryGunBurrow", false)
// L1019
UnitAbilityEnable(auto0861DDE7_var, "BurrowInfestedTerranCampaignDown", false)
// L3500
UnitAbilityEnable(gv_kerrigan, "Implosion", true)
// L3501
UnitAbilityEnable(gv_kerrigan, "OmegaStorm", true)
// L3821
UnitAbilityEnable(gv_kerrigan, "OmegaStorm", false)
// L3823
UnitAbilityEnable(gv_kerrigan, "OmegaStorm", true)
// L3843
UnitAbilityEnable(gv_kerrigan, "Implosion", false)
// L3845
UnitAbilityEnable(gv_kerrigan, "Implosion", true)
// L687
UnitAbilityEnable(UnitLastCreated(), "ZHybridGravitonPrison", true)
// L688
UnitAbilityEnable(UnitLastCreated(), "ZHybridPsionicShockwave", false)
// L689
UnitAbilityEnable(UnitLastCreated(), "ZHybridPsiStorm", false)
// L690
UnitAbilityEnable(UnitLastCreated(), "ZHybridPlasmaBlast", false)
// L691
UnitAbilityEnable(UnitLastCreated(), "ZHybridPsychicClones", false)
// L1330
UnitAbilityEnable(gv_hybridUnitArray[1], "ZHybridGravitonPrison", true)
// L1331
UnitAbilityEnable(gv_hybridUnitArray[1], "ZHybridPsionicShockwave", true)
// L1332
UnitAbilityEnable(gv_hybridUnitArray[1], "ZHybridPlasmaBlast", false)
// L1333
UnitAbilityEnable(gv_hybridUnitArray[1], "ZHybridPsiStorm", false)
// L1334
UnitAbilityEnable(gv_hybridUnitArray[1], "ZHybridPsychicClones", true)
// L1213
UnitAbilityEnable(UnitFromId(708), "SiegeMode", false)
// L1214
UnitAbilityEnable(UnitFromId(592), "SiegeMode", false)
// L1215
UnitAbilityEnable(UnitFromId(593), "SiegeMode", false)
// L453
UnitAbilityEnable(gv_hyperion, "SJHyperionFightersRecall", false)
// L3164
UnitAbilityEnable(gv_hyperion, "SJHyperionFighters", false)
// L3261
UnitAbilityEnable(gv_hyperion, "SJHyperionFighters", true)
// L3270
UnitAbilityEnable(gv_hyperion, "SJHyperionFightersRecall", true)
// L5687
UnitAbilityEnable(UnitLastCreated(), "attack", false)
// L7795
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L7811
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L7848
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L7864
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L7901
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L7917
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L687
UnitAbilityEnable(UnitLastCreated(), "ZHybridGravitonPrison", true)
// L688
UnitAbilityEnable(UnitLastCreated(), "ZHybridPsionicShockwave", false)
// L689
UnitAbilityEnable(UnitLastCreated(), "ZHybridPsiStorm", false)
// L690
UnitAbilityEnable(UnitLastCreated(), "ZHybridPlasmaBlast", false)
// L691
UnitAbilityEnable(UnitLastCreated(), "ZHybridPsychicClones", false)
// L1330
UnitAbilityEnable(gv_hybridUnitArray[1], "ZHybridGravitonPrison", true)
// L1331
UnitAbilityEnable(gv_hybridUnitArray[1], "ZHybridPsionicShockwave", true)
// L1332
UnitAbilityEnable(gv_hybridUnitArray[1], "ZHybridPlasmaBlast", false)
// L1333
UnitAbilityEnable(gv_hybridUnitArray[1], "ZHybridPsiStorm", false)
// L1334
UnitAbilityEnable(gv_hybridUnitArray[1], "ZHybridPsychicClones", true)
// L1213
UnitAbilityEnable(UnitFromId(708), "SiegeMode", false)
// L1214
UnitAbilityEnable(UnitFromId(592), "SiegeMode", false)
// L1215
UnitAbilityEnable(UnitFromId(593), "SiegeMode", false)
// L453
UnitAbilityEnable(gv_hyperion, "SJHyperionFightersRecall", false)
// L3164
UnitAbilityEnable(gv_hyperion, "SJHyperionFighters", false)
// L3261
UnitAbilityEnable(gv_hyperion, "SJHyperionFighters", true)
// L3270
UnitAbilityEnable(gv_hyperion, "SJHyperionFightersRecall", true)
// L5687
UnitAbilityEnable(UnitLastCreated(), "attack", false)
// L7795
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L7811
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L7848
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L7864
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L7901
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L7917
UnitAbilityEnable(lv_flyerDummy, "attack", false)
// L4240
UnitAbilityEnable(gv_basic03Enemy, "attack", false)
// L4248
UnitAbilityEnable(gv_basic03Enemy, "attack", true)
// L6624
UnitAbilityEnable(auto51EC6924_var, "VoidSentryChronoBeam", false)
// L7311
UnitAbilityEnable(auto5359FB81_var, "VoidSentryChronoBeam", true)
// L7020
UnitAbilityEnable(UnitLastCreated(), "VoidZealotWhirlwind", false)
// L7072
UnitAbilityEnable(gv_victoryVorazun, "VorazunShadowDash", false)
// L7083
UnitAbilityEnable(UnitLastCreated(), "ShadowCharge", false)
// L7084
UnitAbilityEnable(UnitLastCreated(), "ShadowChargeStun", false)