# Allow/Disallow Behavior For Player

Grammarallow|Allow/Disallow the behavior behavior for player p
FlagsNative | 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 — Player
  • string [ gamelink::Behavior ] — Behavior
  • bool [ preset::AllowDisallowOption ] — Allow

Returns — void

native void TechTreeBehaviorAllow(
	int player,
	string behaviorType,
	bool allow,
);

Category: Tech Tree / Individual Restrictions

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L553
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true)
// L554
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true)
// L498
TechTreeBehaviorAllow(gv_pLAYER_USER, "TerranBuildingBurnDown", false)
// L542
TechTreeBehaviorAllow(gv_pLAYER_USER, "ZergBuildingDies6", false)
// L483
TechTreeBehaviorAllow(gv_pLAYER01_USER, "Cleave", true)
// L483
TechTreeBehaviorAllow(gv_pLAYER01_USER, "Cleave", true)
// L553
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true)
// L554
TechTreeBehaviorAllow(gv_pLAYER_USER, "Charging", true)
// L498
TechTreeBehaviorAllow(gv_pLAYER_USER, "TerranBuildingBurnDown", false)
// L542
TechTreeBehaviorAllow(gv_pLAYER_USER, "ZergBuildingDies6", false)

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L15823
TechTreeBehaviorAllow(1, "StukovArmorAura", false)
// L15824
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false)
// L15905
TechTreeBehaviorAllow(1, "StukovArmorAura", false)
// L15906
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false)
// L15991
TechTreeBehaviorAllow(1, "StukovArmorAura", true)
// L15992
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", true)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L16334
TechTreeBehaviorAllow(lv_player, libCOMI_gv_cM_Alarak_EmpowerBehaviorCaster, true)
// L16337
TechTreeBehaviorAllow(lv_player, libCOMI_gv_cM_Alarak_EmpowerBehaviorCaster, false)
// L18519
TechTreeBehaviorAllow(lv_player, "FenixExplode", false)
// L27933
TechTreeBehaviorAllow(lv_p, "CannotTrade", true)
// L27960
TechTreeBehaviorAllow(lv_p, "CannotTrade", false)
// L28463
TechTreeBehaviorAllow(lv_p, "CannotTrade", false)

# mods/starcoop/starcoop.sc2mod

LibCOOC.galaxy

// L3934
TechTreeBehaviorAllow(lp_player, libCOMI_gv_cM_Alarak_EmpowerBehaviorCaster, false)

# mods/voidprologue.sc2mod

LibA3DDD02B.galaxy

// L7519
TechTreeBehaviorAllow(1, "StukovArmorAura", false)
// L7520
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false)
// L7551
TechTreeBehaviorAllow(1, "StukovArmorAura", false)
// L7552
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", false)
// L7591
TechTreeBehaviorAllow(1, "StukovArmorAura", true)
// L7592
TechTreeBehaviorAllow(1, "SwarmQueenRegenAura", true)

# mods/warcoop/warclassic.sc2mod

WarClassic.galaxy

// L345
TechTreeBehaviorAllow(lv_p, lv_buff, false)
// L359
TechTreeBehaviorAllow(lv_p, lv_buff, true)

# mods/warcoop/warclassicsystem.sc2mod

WarClassicSystem.galaxy

// L932
TechTreeBehaviorAllow(lv_itPlayer, libGAwX_gv_creepSpotsSleepBehavior, true)
// L941
TechTreeBehaviorAllow(lv_itPlayer, libGAwX_gv_creepSpotsSleepBehavior, false)