# Unit Ability Command State

Grammarunit ability command abilityCommand is in state state
FlagsNative | Function

Returns true if a unit’s ability command is at a certain state.

# Arguments

Returns — bool

native bool UnitCheckAbilCmdState(
	unit inUnit,
	abilcmd inAbilCmd,
	int inState,
);

Category: Ability / Basic

# Examples

# campaigns/liberty.sc2campaign

TactCampAI.galaxy

// L17
UnitCheckAbilCmdState(aiUnit, repaircmd, c_cmdStateIsAutoCast)
// L17
UnitCheckAbilCmdState(aiUnit, repaircmd, c_cmdStateIsAutoCast)

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L1074
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("ZHybridPsionicShockwave", 0), c_cmdStateCooldown)
// L1093
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("ZHybridPlasmaBlast", 0), c_cmdStateCooldown)
// L1098
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("ZHybridGravitonPrison", 0), c_cmdStateCooldown)
// L9239
UnitCheckAbilCmdState(gv_kerrigan, AbilityCommand("MindBolt", 0), c_cmdStateCooldown)
// L508
UnitCheckAbilCmdState(lp_caster, lp_command, c_cmdStateCooldown)
// L513
UnitCheckAbilCmdState(lp_caster, lp_command, c_cmdStateCooldown)
// L2475
UnitCheckAbilCmdState(gv_zeratul, AbilityCommand("PrologueVoidArmor", 0), c_cmdStateHidden)
// L2563
UnitCheckAbilCmdState(gv_zeratul, AbilityCommand("ShadowBlade", 0), c_cmdStateHidden)
// L1074
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("ZHybridPsionicShockwave", 0), c_cmdStateCooldown)
// L1093
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("ZHybridPlasmaBlast", 0), c_cmdStateCooldown)
// L1098
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("ZHybridGravitonPrison", 0), c_cmdStateCooldown)
// L9239
UnitCheckAbilCmdState(gv_kerrigan, AbilityCommand("MindBolt", 0), c_cmdStateCooldown)
// L508
UnitCheckAbilCmdState(lp_caster, lp_command, c_cmdStateCooldown)
// L513
UnitCheckAbilCmdState(lp_caster, lp_command, c_cmdStateCooldown)
// L2475
UnitCheckAbilCmdState(gv_zeratul, AbilityCommand("PrologueVoidArmor", 0), c_cmdStateHidden)
// L2563
UnitCheckAbilCmdState(gv_zeratul, AbilityCommand("ShadowBlade", 0), c_cmdStateHidden)

# campaigns/void.sc2campaign

TactCampAI.galaxy

// L17
UnitCheckAbilCmdState(aiUnit, repaircmd, c_cmdStateIsAutoCast)

# campaigns/void.sc2campaign

MapScript.galaxy

// L792
UnitCheckAbilCmdState(lp_blinkStalker, AbilityCommand("BlinkShieldRestore", 0), c_cmdStateCooldown)
// L838
UnitCheckAbilCmdState(lp_karax, AbilityCommand("PhaseCannon", 0), c_cmdStateCooldown)
// L842
UnitCheckAbilCmdState(lp_karax, AbilityCommand("Reclamation", 0), c_cmdStateCooldown)
// L885
UnitCheckAbilCmdState(lp_alarak, AbilityCommand("AlarakKnockback", 0), c_cmdStateCooldown)
// L911
UnitCheckAbilCmdState(lp_vorazun, AbilityCommand("VorazunShadowFury", 0), c_cmdStateCooldown)
// L911
UnitCheckAbilCmdState(lp_vorazun, AbilityCommand("VorazunShadowDash", 0), c_cmdStateCooldown)
// L441
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPlasmaBlast", 0), c_cmdStateCooldown)
// L454
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPsiStorm", 0), c_cmdStateCooldown)
// L991
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("ConsumeDNA", 0), c_cmdStateCooldown)
// L999
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridFAoEStun", 0), c_cmdStateCooldown)
// L1039
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridGeneralPhaseShift", 0), c_cmdStateCooldown)
// L772
UnitCheckAbilCmdState(lp_darkArchon, AbilityCommand("HybridGeneralPhaseShift", 0), c_cmdStateCooldown)
// L939
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPlasmaBlast", 0), c_cmdStateCooldown)
// L952
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPsiStorm", 0), c_cmdStateCooldown)
// L794
UnitCheckAbilCmdState(lp_kerrigan, AbilityCommand("MindBolt", 0), c_cmdStateCooldown)
// L810
UnitCheckAbilCmdState(lp_kerrigan, AbilityCommand("PsionicLift", 0), c_cmdStateCooldown)
// L829
UnitCheckAbilCmdState(lp_kerrigan, AbilityCommand("PrimalHeal", 0), c_cmdStateCooldown)
// L875
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPlasmaBlast", 0), c_cmdStateCooldown)
// L889
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPsiStorm", 0), c_cmdStateCooldown)
// L4929
UnitCheckAbilCmdState(gv_stukov, AbilityCommand("StukovInfestedTerrans", 0), c_cmdStateCooldown)
// L4961
UnitCheckAbilCmdState(gv_stukov, AbilityCommand("DevastatingShot", 0), c_cmdStateCooldown)
// L5149
UnitCheckAbilCmdState(gv_kerrigan, AbilityCommand("PsionicLift", 0), c_cmdStateCooldown)
// L5181
UnitCheckAbilCmdState(gv_kerrigan, AbilityCommand("MindBolt", 0), c_cmdStateCooldown)
// L5188
UnitCheckAbilCmdState(gv_kerrigan, AbilityCommand("PrimalHeal", 0), c_cmdStateCooldown)
// L518
UnitCheckAbilCmdState(lp_artanis, AbilityCommand("ArtanisLightningDash", 0), c_cmdStateCooldown)
// L578
UnitCheckAbilCmdState(lp_zagara, AbilityCommand("Transfusion", 0), c_cmdStateCooldown)
// L792
UnitCheckAbilCmdState(lp_blinkStalker, AbilityCommand("BlinkShieldRestore", 0), c_cmdStateCooldown)
// L838
UnitCheckAbilCmdState(lp_karax, AbilityCommand("PhaseCannon", 0), c_cmdStateCooldown)
// L842
UnitCheckAbilCmdState(lp_karax, AbilityCommand("Reclamation", 0), c_cmdStateCooldown)
// L885
UnitCheckAbilCmdState(lp_alarak, AbilityCommand("AlarakKnockback", 0), c_cmdStateCooldown)
// L911
UnitCheckAbilCmdState(lp_vorazun, AbilityCommand("VorazunShadowFury", 0), c_cmdStateCooldown)
// L911
UnitCheckAbilCmdState(lp_vorazun, AbilityCommand("VorazunShadowDash", 0), c_cmdStateCooldown)
// L441
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPlasmaBlast", 0), c_cmdStateCooldown)
// L454
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPsiStorm", 0), c_cmdStateCooldown)
// L991
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("ConsumeDNA", 0), c_cmdStateCooldown)
// L999
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridFAoEStun", 0), c_cmdStateCooldown)
// L1039
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridGeneralPhaseShift", 0), c_cmdStateCooldown)
// L772
UnitCheckAbilCmdState(lp_darkArchon, AbilityCommand("HybridGeneralPhaseShift", 0), c_cmdStateCooldown)
// L939
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPlasmaBlast", 0), c_cmdStateCooldown)
// L952
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPsiStorm", 0), c_cmdStateCooldown)
// L794
UnitCheckAbilCmdState(lp_kerrigan, AbilityCommand("MindBolt", 0), c_cmdStateCooldown)
// L810
UnitCheckAbilCmdState(lp_kerrigan, AbilityCommand("PsionicLift", 0), c_cmdStateCooldown)
// L829
UnitCheckAbilCmdState(lp_kerrigan, AbilityCommand("PrimalHeal", 0), c_cmdStateCooldown)
// L875
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPlasmaBlast", 0), c_cmdStateCooldown)
// L889
UnitCheckAbilCmdState(lp_hybrid, AbilityCommand("HybridDominatorVoidPsiStorm", 0), c_cmdStateCooldown)
// L4929
UnitCheckAbilCmdState(gv_stukov, AbilityCommand("StukovInfestedTerrans", 0), c_cmdStateCooldown)
// L4961
UnitCheckAbilCmdState(gv_stukov, AbilityCommand("DevastatingShot", 0), c_cmdStateCooldown)
// L5149
UnitCheckAbilCmdState(gv_kerrigan, AbilityCommand("PsionicLift", 0), c_cmdStateCooldown)
// L5181
UnitCheckAbilCmdState(gv_kerrigan, AbilityCommand("MindBolt", 0), c_cmdStateCooldown)
// L5188
UnitCheckAbilCmdState(gv_kerrigan, AbilityCommand("PrimalHeal", 0), c_cmdStateCooldown)
// L518
UnitCheckAbilCmdState(lp_artanis, AbilityCommand("ArtanisLightningDash", 0), c_cmdStateCooldown)
// L578
UnitCheckAbilCmdState(lp_zagara, AbilityCommand("Transfusion", 0), c_cmdStateCooldown)

# campaigns/voidstory.sc2campaign

VoidCampaignMissionLib.galaxy

// L101
UnitCheckAbilCmdState(lp_darkArchon, AbilityCommand("DarkArchonMindControl", 0), c_cmdStateCooldown)
// L132
UnitCheckAbilCmdState(lp_darkArchon, AbilityCommand("DarkArchonConfusion", 0), c_cmdStateCooldown)
// L170
UnitCheckAbilCmdState(lp_highTemplarTaldarim, AbilityCommand("VoidHighTemplarMindBlast", 0), c_cmdStateCooldown)
// L197
UnitCheckAbilCmdState(lp_highTemplarTaldarim, AbilityCommand("VoidHighTemplarPsiOrb", 0), c_cmdStateCooldown)

# campaigns/voidstory.sc2campaign

VoidCampaignUILib.galaxy

// L4974
UnitCheckAbilCmdState(libVCUI_gv_pU_GPUnit, lv_indexCommand, c_cmdStateDisabled)

# mods/core.sc2mod

TactTerrAI.galaxy

// L1614
UnitCheckAbilCmdState(aiUnit, autoCastCmd, c_cmdStateIsAutoCast)

# mods/novastoryassets.sc2mod

MapScript.galaxy

// L1384
UnitCheckAbilCmdState(lp_oracle, AbilityCommand("OracleRevelationV2", 0), c_cmdStateCooldown)
// L1384
UnitCheckAbilCmdState(lp_oracle, AbilityCommand("OracleRevelationV2", 0), c_cmdStateCooldown)

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L13318
UnitCheckAbilCmdState(lv_indexStructure, AbilityCommand(lv_structureAbility, lv_commandIndex), c_cmdStateDisabled)
// L13318
UnitCheckAbilCmdState(lv_indexStructure, AbilityCommand(lv_structureAbility, lv_commandIndex), c_cmdStateHidden)
// L13330
UnitCheckAbilCmdState(lv_indexStructure, AbilityCommand(lv_structureAbility, lv_commandIndex), c_cmdStateDisabled)
// L13330
UnitCheckAbilCmdState(lv_indexStructure, AbilityCommand(lv_structureAbility, lv_commandIndex), c_cmdStateHidden)

# mods/starcoop/starcoop.sc2mod

TactCampAI.galaxy

// L367
UnitCheckAbilCmdState(aiUnit, repaircmd, c_cmdStateIsAutoCast)

# mods/starcoop/starcoop.sc2mod

TactTerrAI.galaxy

// L1561
UnitCheckAbilCmdState(aiUnit, autoCastCmd, c_cmdStateIsAutoCast)

# mods/warcoop/warclassicsystem.sc2mod

WarClassicTactical.galaxy

// L639
UnitCheckAbilCmdState(lp_aIUnit, AbilityCommand(lv_itAbilLink, 0), c_cmdStateDisabled)