Difference between revisions of "Category:Team functions"

From Fortress Forever Wiki
Jump to navigationJump to search
Line 9: Line 9:
 
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]]

Revision as of 13:47, 5 May 2010

These are functions that can be applied to a team.

Usage

CFFTeam:function(parameters)

Example

POINTS_PER_CAPTURE = 10
local team = player:GetTeam() --returns a CFFTeam object, on which we can run team functions.
team:AddScore(POINTS_PER_CAPTURE)
Command Description
AddScore(int) Adds points to the team's score
GetNumPlayers() returns the number of plaers on the team
GetPlayer ???
GetTeamId() returns the Team ID for this team
SetName(string) Sets the team's name? The global function SetTeamName( teamid, name ) also does this.
SetAllies( teamid ) Sets another team to be allied with this team.
SetClassLimit( classid, int ) Limits a class on this team. -1 means no limit.
SetPlayerLimit(int) Limits the number of players on the team? The global function SetPlayerLimit( teamid, int ) also does this.

See also Team Flags and Lua:Entity_typing#CFFTeam

This category currently contains no pages or media.