# Index Of Ability Command
Grammar — Index of abilityCommand
Flags —Native
|Function
Returns the index value of an ability command. An ability command is the combination of an ability and an index for a command within that ability.
# Arguments
abilcmd
— Ability Command
Returns — int
native int AbilityCommandGetCommand(abilcmd inAbilCmd);
# Related
Category: Order / Ability Commands
- Ability Command —
abilcmd
— AbilityCommand - Ability Of Ability Command —
string
<gamelink::Abil> — AbilityCommandGetAbility - Index Of Ability Command —
int
— AbilityCommandGetCommand - Action Type For Ability Command —
int
<preset::AbilityCommandActionType> — AbilityCommandGetAction
# Examples
campaigns/liberty.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:126
curAbilCmd = OrderGetAbilityCommand(curOrd);
if (AbilityCommandGetAbility(curAbilCmd) != c_AB_OdinBarrage ||
AbilityCommandGetCommand(curAbilCmd) != 0) {
return;
}
campaigns/swarm.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:126
curAbilCmd = OrderGetAbilityCommand(curOrd);
if (AbilityCommandGetAbility(curAbilCmd) != c_AB_OdinBarrage ||
AbilityCommandGetCommand(curAbilCmd) != 0) {
return;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:5412
// Automatic Variable Declarations
// Implementation
UnitSetInfoButtonTooltip(lp_unit, ((AbilityCommandGetAbility(lp_key)) + "," + IntToString(AbilityCommandGetCommand(lp_key))), lp_text);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:5430
// Automatic Variable Declarations
// Implementation
UnitClearInfoButtonTooltip(lp_unit, ((AbilityCommandGetAbility(lp_abilcmd)) + "," + IntToString(AbilityCommandGetCommand(lp_abilcmd))));
}
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:162
curAbilCmd = OrderGetAbilityCommand(curOrd);
if (AbilityCommandGetAbility(curAbilCmd) != c_AB_Bombardment ||
AbilityCommandGetCommand(curAbilCmd) != 0) {
return;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:3564
// Variable Initialization
lv_link = AbilityCommandGetAbility(lp_abilityCommand);
lv_index = AbilityCommandGetCommand(lp_abilityCommand);
// Implementation
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6032
lv_cmd = TechTreeUnitProducedAbilCmd(lv_uT, lv_i);
lv_abil = AbilityCommandGetAbility(lv_cmd);
lv_abilIndex = AbilityCommandGetCommand(lv_cmd);
CatalogFieldValueSet(c_gameCatalogAbil, lv_abil, "InfoArray[" + IntToString(lv_abilIndex) + "].Button.Requirements", lp_p, (lv_requirement));
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:26004
lv_bar = EventUnit();
lv_abilcmd = OrderGetAbilityCommand(EventUnitOrder());
lv_index = AbilityCommandGetCommand(lv_abilcmd);
lv_p = UnitGetOwner(lv_bar);
lv_unitType = (CatalogFieldValueGet(c_gameCatalogAbil, "TychusFakeReviveTrain", "InfoArray[" + IntToString(lv_index) + "].Unit[" + IntToString(0) + "]", lv_p));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:476
curAbilCmd = OrderGetAbilityCommand(curOrd);
if (AbilityCommandGetAbility(curAbilCmd) != c_AB_OdinBarrage ||
AbilityCommandGetCommand(curAbilCmd) != 0) {
return;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1544
curAbilCmd = OrderGetAbilityCommand(curOrd);
if (AbilityCommandGetAbility(curAbilCmd) != c_AB_OdinMKIIBarrage ||
AbilityCommandGetCommand(curAbilCmd) != 0) {
return;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1320
curAbilCmd = OrderGetAbilityCommand(curOrd);
if (AbilityCommandGetAbility(curAbilCmd) != c_AB_OracleStasisWard
|| AbilityCommandGetCommand(curAbilCmd) != 0) {
return;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:165
curAbilCmd = OrderGetAbilityCommand(curOrd);
if (AbilityCommandGetAbility(curAbilCmd) != c_AB_Bombardment ||
AbilityCommandGetCommand(curAbilCmd) != 0) {
return;
}