# Allow/Disallow Behavior For Player
Grammar — allow|Allow/Disallow the behavior behavior for player p
Flags —Native
|Action
Allows or disallows a behavior to be used by the specified player. This is only useful if tech restrictions have been enabled using “Enable/Disable Tech Tree Restrictions”. If the behavior has a tech requirement, the requirement must still be met for the player to use the behavior.
# Arguments
int
— Playerstring
<gamelink::Behavior> — Behaviorbool
<preset::AllowDisallowOption> — Allow
Returns — void
native void TechTreeBehaviorAllow(
int player,
string behaviorType,
bool allow,
);
# Related
Category: Tech Tree / Individual Restrictions
- Specific Requirements Are Enabled For Player —
bool
— TechTreeSpecificRequirementEnabled - Enable/Disable SpecificTech Tree Requirements —
void
— TechTreeSpecificRequirementEnable - Allow/Disallow Behavior For Player —
void
— TechTreeBehaviorAllow - Allow/Disallow Ability For Player —
void
— TechTreeAbilityAllow - Allow/Disallow Unit For Player —
void
— TechTreeUnitAllow - Allow/Disallow Upgrade For Player —
void
— TechTreeUpgradeAllow - Ability Is Allowed For Player —
bool
— TechTreeAbilityIsAllowed - Behavior Is Allowed For Player —
bool
— TechTreeBehaviorIsAllowed - Unit Is Allowed For Player —
bool
— TechTreeUnitIsAllowed - Upgrade Is Allowed For Player —
bool
— TechTreeUpgradeIsAllowed - Add Upgrade Level For Player —
void
— TechTreeUpgradeAddLevel - Set Upgrade Level For Player —
void
— libNtve_gf_SetUpgradeLevelForPlayer - Set Production Cap For Player —
void
— TechTreeSetProduceCap - Production Cap For Player —
int
— TechTreeGetProduceCap
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:483
TechTreeUpgradeAddLevel(gv_pLAYER01_USER, "ZergGroundArmorsLevel2", 1);
TechTreeUpgradeAddLevel(gv_pLAYER01_USER, "ZergGroundArmorsLevel3", 1);
TechTreeBehaviorAllow(gv_pLAYER01_USER, "Cleave", true);
TechTreeAbilityAllow(gv_pLAYER01_USER, AbilityCommand("BurrowUltraliskDown", 0), true);
TechTreeAbilityAllow(gv_pLAYER01_USER, AbilityCommand("BurrowUltraliskUp", 0), true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/protosscombat.sc2map/MapScript.galaxy:553
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("PsiStorm", 0), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("Blink", 0), true);
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true);
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_USER, "Charge", 1);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/protosscombat.sc2map/MapScript.galaxy:554
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("Blink", 0), true);
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true);
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_USER, "Charge", 1);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_USER, "BlinkTech", 1);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/terrancombat.sc2map/MapScript.galaxy:498
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("SiegeMode", 0), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("Unsiege", 0), true);
TechTreeBehaviorAllow(gv_pLAYER_USER, "TerranBuildingBurnDown", false);
TechTreeUpgradeAddLevel(gv_pLAYER_USER, "Stimpack", 1);
TechTreeUpgradeAddLevel(gv_pLAYER_USER, "ShieldWall", 1);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/zergcombat.sc2map/MapScript.galaxy:542
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_COMPUTER1, AbilityCommand("TemporalRift", 0), false);
TechTreeBehaviorAllow(gv_pLAYER_USER, "ZergBuildingDies6", false);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("BurrowUltraliskDown", 0), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("BurrowZerglingDown", 0), true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:483
TechTreeUpgradeAddLevel(gv_pLAYER01_USER, "ZergGroundArmorsLevel2", 1);
TechTreeUpgradeAddLevel(gv_pLAYER01_USER, "ZergGroundArmorsLevel3", 1);
TechTreeBehaviorAllow(gv_pLAYER01_USER, "Cleave", true);
TechTreeAbilityAllow(gv_pLAYER01_USER, AbilityCommand("BurrowUltraliskDown", 0), true);
TechTreeAbilityAllow(gv_pLAYER01_USER, AbilityCommand("BurrowUltraliskUp", 0), true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/protosscombat.sc2map — MapScript.galaxy:553
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("PsiStorm", 0), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("Blink", 0), true);
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true);
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_USER, "Charge", 1);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/protosscombat.sc2map — MapScript.galaxy:554
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("Blink", 0), true);
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true);
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_USER, "Charge", 1);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_USER, "BlinkTech", 1);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/terrancombat.sc2map — MapScript.galaxy:498
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("SiegeMode", 0), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("Unsiege", 0), true);
TechTreeBehaviorAllow(gv_pLAYER_USER, "TerranBuildingBurnDown", false);
TechTreeUpgradeAddLevel(gv_pLAYER_USER, "Stimpack", 1);
TechTreeUpgradeAddLevel(gv_pLAYER_USER, "ShieldWall", 1);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/zergcombat.sc2map — MapScript.galaxy:542
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_COMPUTER1, AbilityCommand("TemporalRift", 0), false);
TechTreeBehaviorAllow(gv_pLAYER_USER, "ZergBuildingDies6", false);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("BurrowUltraliskDown", 0), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("BurrowZerglingDown", 0), true);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:15823
}
libNtve_gf_SetUpgradeLevelForPlayer(1, "InCinematic", 1);
TechTreeBehaviorAllow(1, "StukovArmorAura", false);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false);
auto78D8CDE8_val = libSwaC_gf_CurrentMap();
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:15824
libNtve_gf_SetUpgradeLevelForPlayer(1, "InCinematic", 1);
TechTreeBehaviorAllow(1, "StukovArmorAura", false);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false);
auto78D8CDE8_val = libSwaC_gf_CurrentMap();
if (auto78D8CDE8_val == "ZLab2") {
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:15905
}
TechTreeBehaviorAllow(1, "StukovArmorAura", false);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false);
auto4A7031D2_val = libSwaC_gf_CurrentMap();
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:15906
TechTreeBehaviorAllow(1, "StukovArmorAura", false);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false);
auto4A7031D2_val = libSwaC_gf_CurrentMap();
if (auto4A7031D2_val == "ZLab2") {
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:15991
}
TechTreeBehaviorAllow(1, "StukovArmorAura", true);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", true);
libNtve_gf_SetUpgradeLevelForPlayer(1, "InCinematic", 0);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:15992
TechTreeBehaviorAllow(1, "StukovArmorAura", true);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", true);
libNtve_gf_SetUpgradeLevelForPlayer(1, "InCinematic", 0);
auto44D741E0_val = libSwaC_gf_CurrentMap();
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:16337
CatalogFieldValueSet(c_gameCatalogBehavior, libCOMI_gv_cM_Alarak_EmpowerBehaviorCaster, "Modification.DamageDealtUnscaled[Ranged]", lv_player, FixedToString(lv_attackDamage, c_fixedPrecisionAny));
if ((lv_totalSupply[lv_player] > 0.0)) {
TechTreeBehaviorAllow(lv_player, libCOMI_gv_cM_Alarak_EmpowerBehaviorCaster, true);
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:16340
}
else {
TechTreeBehaviorAllow(lv_player, libCOMI_gv_cM_Alarak_EmpowerBehaviorCaster, false);
}
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:18522
libCOMI_gv_cM_Fenix_KilledSelf[lv_player] = true;
libCOMI_gv_cM_Fenix_KillCount[lv_player] += 1;
TechTreeBehaviorAllow(lv_player, "FenixExplode", false);
libNtve_gf_SetUpgradeLevelForPlayer(lv_player, "AStrongHeart", 1);
SoundChannelStop(PlayerGroupSingle(lv_player), c_soundCategoryVoice);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:27941
}
TechTreeBehaviorAllow(lv_p, "CannotTrade", true);
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:27968
}
TechTreeBehaviorAllow(lv_p, "CannotTrade", false);
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:28471
libCOMI_gv_cM_ZeratulPlayer = lv_p;
libCOMI_gf_CM_Zeratul_PlaceArtifact(libCOMI_gv_cM_ZeratulPlayer);
TechTreeBehaviorAllow(lv_p, "CannotTrade", false);
TechTreeAbilityAllow(lv_p, AbilityCommand("RoboticsBayResearch", 1), false);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:3934
}
TechTreeBehaviorAllow(lp_player, libCOMI_gv_cM_Alarak_EmpowerBehaviorCaster, false);
if ((TechTreeUpgradeCount(lp_player, "MasteryZagaraRoachDropDamageAndHealth", c_techCountCompleteOnly) >= 1)) {
libCOMI_gf_CM_MasteryZagraRoachLifeIncrease(lp_player);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:7519
}
libNtve_gf_SetUpgradeLevelForPlayer(1, "InCinematic", 1);
TechTreeBehaviorAllow(1, "StukovArmorAura", false);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false);
autoBBAB5C7E_g = UnitGroup("K5Kerrigan", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:7520
libNtve_gf_SetUpgradeLevelForPlayer(1, "InCinematic", 1);
TechTreeBehaviorAllow(1, "StukovArmorAura", false);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false);
autoBBAB5C7E_g = UnitGroup("K5Kerrigan", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
autoBBAB5C7E_u = UnitGroupCount(autoBBAB5C7E_g, c_unitCountAll);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:7551
}
TechTreeBehaviorAllow(1, "StukovArmorAura", false);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false);
autoB22EE70A_val = UnitGetType(EventUnitCreatedUnit());
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:7552
TechTreeBehaviorAllow(1, "StukovArmorAura", false);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false);
autoB22EE70A_val = UnitGetType(EventUnitCreatedUnit());
if (autoB22EE70A_val == "K5Kerrigan") {
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:7591
}
TechTreeBehaviorAllow(1, "StukovArmorAura", true);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", true);
libNtve_gf_SetUpgradeLevelForPlayer(1, "InCinematic", 0);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:7592
TechTreeBehaviorAllow(1, "StukovArmorAura", true);
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", true);
libNtve_gf_SetUpgradeLevelForPlayer(1, "InCinematic", 0);
auto59A43DBA_g = UnitGroup("K5Kerrigan", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
mods/warcoop/warclassic.sc2mod — base.sc2data/TriggerLibs/WarClassic.galaxy:345
for(;auto8C1EEC81_i<=auto8C1EEC81_c;auto8C1EEC81_i+=1){
lv_buff=GAw3_EntrySetEntry(auto8C1EEC81_s,auto8C1EEC81_i);
TechTreeBehaviorAllow(lv_p, lv_buff, false);
}
}
mods/warcoop/warclassic.sc2mod — base.sc2data/TriggerLibs/WarClassic.galaxy:359
for(;autoB3C79540_i<=autoB3C79540_c;autoB3C79540_i+=1){
lv_buff=GAw3_EntrySetEntry(autoB3C79540_s,autoB3C79540_i);
TechTreeBehaviorAllow(lv_p, lv_buff, true);
}
}
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:932
lv_itPlayer = PlayerGroupNextPlayer(auto89AEC29B_g, lv_itPlayer);
if (lv_itPlayer < 0) { break; }
TechTreeBehaviorAllow(lv_itPlayer, libGAwX_gv_creepSpotsSleepBehavior, true);
}
}
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:941
lv_itPlayer = PlayerGroupNextPlayer(auto460EA58E_g, lv_itPlayer);
if (lv_itPlayer < 0) { break; }
TechTreeBehaviorAllow(lv_itPlayer, libGAwX_gv_creepSpotsSleepBehavior, false);
}
}