Difference between revisions of "Lua:SmartClassLimits"
From Fortress Forever Wiki
Jump to navigationJump to searchMulchman MM (talk | contribs) |
|||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| + | {{Infobox manual/Header}} | ||
==SmartClassLimits== | ==SmartClassLimits== | ||
SmartClassLimits is a way of simplifying SetTeamClassLimits. It must be placed in your map's startup() function and gets passed 11 parameters: | SmartClassLimits is a way of simplifying SetTeamClassLimits. It must be placed in your map's startup() function and gets passed 11 parameters: | ||
| − | <pre> | + | <pre>SmartClassLimits( team, scout, sniper, soldier, demoman, medic, hwguy, pyro, spy, engineer, civilian )</pre> |
<pre> | <pre> | ||
| Line 37: | Line 38: | ||
</pre> | </pre> | ||
| − | [[Category: | + | [[Category:Lua_Commands]] |
| + | {{Infobox manual/Footer}} | ||
Latest revision as of 16:41, 31 December 2007
|
SmartClassLimitsSmartClassLimits is a way of simplifying SetTeamClassLimits. It must be placed in your map's startup() function and gets passed 11 parameters: SmartClassLimits( team, scout, sniper, soldier, demoman, medic, hwguy, pyro, spy, engineer, civilian ) team - team to set limits on scout - number of scouts allowed sniper - number of snipers allowed soldier - number of soldiers allowed demoman - number of demomen allowed medic - number of medics allowed hwguy - number of hwguys allowed pyro - number of pyros allowed spy - number of spies allowed engineer - number of engineers allowed civilian - number of civilians allowed In this example, we will make red only have 2 snipers and blue not have any soldiers, plus eliminate the ability to have civilians on any team: Example .LUA startup() functionfunction startup()
-- Limit red to 2 snipers (and eliminate red civilians)
SmartClassLimits( RED_TEAM, 0, 2, 0, 0, 0, 0, 0, 0, 0, -1 )
-- Remove soldiers from blue team (and eliminate blue civilians)
SmartClassLimits( BLUE_TEAM, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1 )
-- Remove yellow civilians
SmartClassLimits( YELLOW_TEAM, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1 )
-- Remove green civilians
SmartClassLimits( GREEN_TEAM, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1 )
end
|