# Ability Is Allowed For Player
Grammar — abilCmd is allowed for player p
Flags —Native
|Function
Returns true if an ability is allowed for the specified player. Use “Allow/Disallow Ability For Player” to modify this.
# Arguments
int
— Playerabilcmd
— Ability Command
Returns — bool
native bool TechTreeAbilityIsAllowed(
int player,
abilcmd inAbilCmd,
);
# Related
Category: Tech Tree / Individual Restrictions
- [F] —
bool
— Specific Requirements Are Enabled For Player — ( TechTreeSpecificRequirementEnabled ) - [F] —
void
— Enable/Disable SpecificTech Tree Requirements — ( TechTreeSpecificRequirementEnable ) - [F] —
void
— Allow/Disallow Behavior For Player — ( TechTreeBehaviorAllow ) - [F] —
void
— Allow/Disallow Ability For Player — ( TechTreeAbilityAllow ) - [F] —
void
— Allow/Disallow Unit For Player — ( TechTreeUnitAllow ) - [F] —
void
— Allow/Disallow Upgrade For Player — ( TechTreeUpgradeAllow ) - [F] —
bool
— Ability Is Allowed For Player — ( TechTreeAbilityIsAllowed ) - [F] —
bool
— Behavior Is Allowed For Player — ( TechTreeBehaviorIsAllowed ) - [F] —
bool
— Unit Is Allowed For Player — ( TechTreeUnitIsAllowed ) - [F] —
bool
— Upgrade Is Allowed For Player — ( TechTreeUpgradeIsAllowed ) - [F] —
void
— Add Upgrade Level For Player — ( TechTreeUpgradeAddLevel ) - [F] —
void
— Set Upgrade Level For Player — ( libNtve_gf_SetUpgradeLevelForPlayer ) - [F] —
void
— Set Production Cap For Player — ( TechTreeSetProduceCap ) - [F] —
int
— Production Cap For Player — ( TechTreeGetProduceCap )
# Examples
# campaigns/libertystory.sc2campaign
// L723
TechTreeAbilityIsAllowed(1, AbilityCommand("TerranBuild", 10))
// L732
TechTreeAbilityIsAllowed(1, AbilityCommand("TerranBuild", 11))
// L7143
TechTreeAbilityIsAllowed(lp_player, AbilityCommand("BarracksTrain", 4))
// L7143
TechTreeAbilityIsAllowed(lp_player, AbilityCommand("BarracksTrain", 3))
// L7143
TechTreeAbilityIsAllowed(lp_player, AbilityCommand("BarracksTrain", 1))
// L7143
TechTreeAbilityIsAllowed(lp_player, AbilityCommand("BarracksTrain", 2))
// L7143
TechTreeAbilityIsAllowed(lp_player, AbilityCommand("BarracksTrain", 5))
// L7149
TechTreeAbilityIsAllowed(lp_player, AbilityCommand("FactoryTrain", 5))
// L7149
TechTreeAbilityIsAllowed(lp_player, AbilityCommand("FactoryTrain", 4))
// L7149
TechTreeAbilityIsAllowed(lp_player, AbilityCommand("FactoryTrain", 6))
# campaigns/voidstory.sc2campaign
// L5590
TechTreeAbilityIsAllowed(1, UserDataGetAbilCmd("CampaignPerk", lp_ability, "AbilityCommand", 1))
# mods/starcoop/starcoop.sc2mod
// L9787
TechTreeAbilityIsAllowed(lp_player, lp_abilityCommand)
# mods/starcoop/starcoop.sc2mod
// L4660
TechTreeAbilityIsAllowed(lp_player, lv_command)