# Set Production Cap For Player

Grammar — Limit player p to only be able to produce cap production in cat category
FlagsNative | Action

Use -1 to remove the cap of the production.

# Arguments

  • int — Player
  • string [ anygamelink ] — Production
  • int [ preset::TechTreeCategory ] — Category
  • int — Cap

Returns — void

native void TechTreeSetProduceCap(
	int p,
	string production,
	int cat,
	int cap,
);

Category: Tech Tree / Individual Restrictions

# Examples

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L6106
TechTreeSetProduceCap(lp_player, "Alias_TychusUniqueUnit", c_techCatUnit, libCOMI_gv_cM_Tychus_MaxHeroCount)
// L6107
TechTreeSetProduceCap(lp_player, "TychusCoop", c_techCatUnit, 1)
// L6108
TechTreeSetProduceCap(lp_player, "TychusReaper", c_techCatUnit, 1)
// L6109
TechTreeSetProduceCap(lp_player, "TychusWarhound", c_techCatUnit, 1)
// L6110
TechTreeSetProduceCap(lp_player, "TychusFirebat", c_techCatUnit, 1)
// L6111
TechTreeSetProduceCap(lp_player, "TychusHERC", c_techCatUnit, 1)
// L6112
TechTreeSetProduceCap(lp_player, "TychusMarauder", c_techCatUnit, 1)
// L6113
TechTreeSetProduceCap(lp_player, "TychusGhost", c_techCatUnit, 1)
// L6114
TechTreeSetProduceCap(lp_player, "TychusSpectre", c_techCatUnit, 1)
// L6115
TechTreeSetProduceCap(lp_player, "TychusMedic", c_techCatUnit, 1)

# mods/warcoop/warclassic.sc2mod

WarClassic.galaxy

// L1140
TechTreeSetProduceCap(lv_p, "uske", c_techCatUnit, libGAw3_gv_bj_MAX_SKELETONS)

# mods/warcoop/warclassicsystem.sc2mod

WarClassicSystem.galaxy

// L259
TechTreeSetProduceCap(lv_p, UserDataGetGameLink("MeleeSetting_HeroLimit", lv_itLimitInstance, "Hero", 1), c_techCatUnit, UserDataGetInt("MeleeSetting_HeroLimit", lv_itLimitInstance, "Limit", 1))

# mods/warcoop/warcoopdata.sc2mod

WarCoopData.galaxy

// L2073
TechTreeSetProduceCap(lp_player, "_CoopHero", c_techCatUnit, 1)
// L2074
TechTreeSetProduceCap(lp_player, "TALT", c_techCatUnit, 1)