Difference between revisions of "Category:Team functions"

From Fortress Forever Wiki
Jump to navigationJump to search
m
 
(One intermediate revision 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


Mapping for FF
The Basics

Setting up Hammer
Getting Started With Lua
Releasing a map

FF-specific Entities

Lua location system

Map Templates
FF Lua Documentation

Entity Typing
Entity Collections

Commands
Callbacks

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.