Difference between revisions of "Category:Team functions"
From Fortress Forever Wiki
Jump to navigationJump to search (New page: These are functions that can be applied to a team. ===Usage=== CFFTeam:''function''(''parameters'') ===Example=== <pre>POINTS_PER_CAPTURE = 10 local team = player:GetTeam() --returns a C...) |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Infobox manual/Header}} | ||
+ | {{Infobox_mapping}} | ||
These are functions that can be applied to a team. | These are functions that can be applied to a team. | ||
Line 9: | Line 11: | ||
team:AddScore(POINTS_PER_CAPTURE)</pre> | team:AddScore(POINTS_PER_CAPTURE)</pre> | ||
− | AddScore | + | {| border="1" cellspacing="2" cellpadding="5" |
− | GetNumPlayers | + | ! Command !! Description |
− | GetPlayer | + | |- |
− | GetTeamId | + | | [[Lua:AddScore|AddScore]](int) || Adds points to the team's score |
− | SetName | + | |- |
− | SetAllies | + | | [[Lua:GetNumPlayers|GetNumPlayers]]() || returns the number of plaers on the team |
− | SetClassLimit | + | |- |
− | SetPlayerLimit | + | | [[Lua:GetPlayer|GetPlayer]] || ??? |
+ | |- | ||
+ | | [[Lua:GetTeamId|GetTeamId]]() || returns the [[Lua:Flags#Team|Team ID]] for this team | ||
+ | |- | ||
+ | | [[Lua:SetName|SetName]](string) || Sets the team's name? The global function SetTeamName( teamid, name ) also does this. | ||
+ | |- | ||
+ | | [[Lua:SetAllies|SetAllies]]( teamid ) || Sets another team to be allied with this team. | ||
+ | |- | ||
+ | | [[Lua:SetClassLimit|SetClassLimit]]( classid, int ) || Limits a class on this team. -1 means no limit. | ||
+ | |- | ||
+ | | [[Lua:SetPlayerLimit|SetPlayerLimit]](int) || Limits the number of players on the team? The global function SetPlayerLimit( teamid, int ) also does this. | ||
+ | |} | ||
− | See also [[Lua:Flags#Team|Team Flags]] | + | See also [[Lua:Flags#Team|Team Flags]] and [[Lua:Entity_typing#CFFTeam]] |
[[Category:Lua]] | [[Category:Lua]] | ||
[[Category:Lua_Commands]] | [[Category:Lua_Commands]] | ||
+ | {{Infobox manual/Footer}} |
Latest revision as of 13:56, 5 May 2010
These are functions that can be applied to a team. UsageCFFTeam:function(parameters) ExamplePOINTS_PER_CAPTURE = 10 local team = player:GetTeam() --returns a CFFTeam object, on which we can run team functions. team:AddScore(POINTS_PER_CAPTURE)
See also Team Flags and Lua:Entity_typing#CFFTeam |
This category currently contains no pages or media.