GetTeamProperty: Difference between revisions

From Zandronum Wiki
(Created page with "{{Template:ACSWarning}} int '''GetTeamProperty''' (int ''team'', int ''prop'') ==Usage== Returns the requested information on the specified team. ==Properties== <div style...")
 
No edit summary
Tag: Source edit
 
Line 2: Line 2:
int '''GetTeamProperty''' (int ''team'', int ''prop'')
int '''GetTeamProperty''' (int ''team'', int ''prop'')


==Usage==
== Usage ==


Returns the requested information on the specified team.
=== Parameters ===
* ''team'': The team number to get the information of.
* ''prop'': One of:
:*'''TPROP_NumLivePlayers'''
::Returns number of live players remaining on this team.
:*'''TPROP_IsValid'''
::Whether the team is valid and can be joined to.
:*'''TPROP_Score'''
::Returns the effective score of this team. This is frags in team deathmatch, wins in TLMS, flags in CTF, etc.
:*'''TPROP_TextColor'''
::Text color for the team. This returns a "color range" identifier, which can be used in the ''color'' field in HudMessage.
:*'''TPROP_PlayerStartNum'''
::Returns the id of what the team spawns on.
:*'''TPROP_Spread'''
::Returns the spread of points between teams.
:*'''TPROP_Assister'''
::The player who returned the team's item. If a score occurrs, this person will get an Assist medal. -1 if nobody is eligible for an assist.
:*'''TPROP_Carrier'''
::The enemy player carrying this team's item. -1 if team item is not stolen.
:*'''TPROP_FragCount'''
::Returns total frags of this team.
:*'''TPROP_DeathCount'''
::Returns total deaths of this team.
:*'''TPROP_WinCount'''
::Returns total wins.of this team. (TLMS)
:*'''TPROP_PointCount'''
::Returns total point count of this team. (CTF, Skulltag, Possession, Teamgame)
:*'''TPROP_ReturnTics'''
::How many tics until the dropped team item will be automatically returned to its pedestal. 0 if the team item is not dropped in the first place.
:*'''TPROP_NumPlayers'''
::Returns number of players on a team.
:*'''TPROP_TeamItem'''
::Dynamic string containing the class name of the team item, such as BlueFlag.
:*'''TPROP_WinnerTheme'''
::Dynamic string containing the music played for members of this team if this team won.
:*'''TPROP_LoserTheme'''
::Dynamic string containing the music played for members of this team if this team lost.
:*'''TPROP_Name'''
::Dynamic string containing the name of team.


==Properties==
=== Return value ===
Returns the requested property of the specified team.


<div style="border: 1px dotted; white-space: pre-wrap;">
TPROP_Name, TPROP_TeamItem, TPROP_WinnerTheme, TPROP_LoserTheme are dynamic strings akin to those returned by {{Zdoomwiki|StrParam}}: after one tick, they expire.
;TPROP_NumLivePlayers
:Returns number of live players remaining on this team.
;TPROP_IsValid
:Whether the team is valid and can be joined to.
;TPROP_Score
:Returns the effective score of this team. This is frags in team deathmatch, wins in TLMS, flags in CTF, etc.
;TPROP_TextColor
:Text color for the team. This returns a "color range" identifier, which can be used in the ''color'' field in HudMessage.
;TPROP_PlayerStartNum
:Returns the id of what the team spawns on.
;TPROP_Spread
:Returns the spread of points between teams.
;TPROP_Assister
:The player who returned the team's item. If a score occurrs, this person will get an Assist medal. -1 if nobody is eligible for an assist.
;TPROP_Carrier
:The enemy player carrying this team's item. -1 if team item is not stolen.
;TPROP_FragCount
:Returns total frags of this team.
;TPROP_DeathCount
:Returns total deaths of this team.
;TPROP_WinCount
:Returns total wins.of this team. (TLMS)
;TPROP_PointCount
:Returns total point count of this team. (CTF, Skulltag, Possession, Teamgame)
;TPROP_ReturnTics
:How many tics until the dropped team item will be automatically returned to its pedestal. 0 if the team item is not dropped in the first place.
;TPROP_NumPlayers
:Returns number of players on a team.
;TPROP_TeamItem
:Dynamic string containing the class name of the team item, such as BlueFlag.
;TPROP_WinnerTheme
:Dynamic string containing the music played for members of this team if this team won.
;TPROP_LoserTheme
:Dynamic string containing the music played for members of this team if this team lost.
;TPROP_Name
:Dynamic string containing the name of team.</div>
Note: TPROP_ReturnTics and TPROP_Assister do not work in client-side scripts yet. 8/28/2012


TPROP_Name, TPROP_TeamItem, TPROP_WinnerTheme, TPROP_LoserTheme are dynamic strings akin to those returned by [http://zdoom.org/wiki/strparam StrParam]. After one tick, they expire.
== Examples ==
{{noexamples}}


==Examples==
[[Category:ACS functions]]
{{noexamples}}
 
[[category:ACS Functions]]

Latest revision as of 18:36, 2 July 2022

This article documents a Zandronum-specific ACS feature which may not be supported by ZDoom and its other child ports.

int GetTeamProperty (int team, int prop)

Usage

Parameters

  • team: The team number to get the information of.
  • prop: One of:
  • TPROP_NumLivePlayers
Returns number of live players remaining on this team.
  • TPROP_IsValid
Whether the team is valid and can be joined to.
  • TPROP_Score
Returns the effective score of this team. This is frags in team deathmatch, wins in TLMS, flags in CTF, etc.
  • TPROP_TextColor
Text color for the team. This returns a "color range" identifier, which can be used in the color field in HudMessage.
  • TPROP_PlayerStartNum
Returns the id of what the team spawns on.
  • TPROP_Spread
Returns the spread of points between teams.
  • TPROP_Assister
The player who returned the team's item. If a score occurrs, this person will get an Assist medal. -1 if nobody is eligible for an assist.
  • TPROP_Carrier
The enemy player carrying this team's item. -1 if team item is not stolen.
  • TPROP_FragCount
Returns total frags of this team.
  • TPROP_DeathCount
Returns total deaths of this team.
  • TPROP_WinCount
Returns total wins.of this team. (TLMS)
  • TPROP_PointCount
Returns total point count of this team. (CTF, Skulltag, Possession, Teamgame)
  • TPROP_ReturnTics
How many tics until the dropped team item will be automatically returned to its pedestal. 0 if the team item is not dropped in the first place.
  • TPROP_NumPlayers
Returns number of players on a team.
  • TPROP_TeamItem
Dynamic string containing the class name of the team item, such as BlueFlag.
  • TPROP_WinnerTheme
Dynamic string containing the music played for members of this team if this team won.
  • TPROP_LoserTheme
Dynamic string containing the music played for members of this team if this team lost.
  • TPROP_Name
Dynamic string containing the name of team.

Return value

Returns the requested property of the specified team.

TPROP_Name, TPROP_TeamItem, TPROP_WinnerTheme, TPROP_LoserTheme are dynamic strings akin to those returned by StrParam: after one tick, they expire.

Examples

This article lists no examples, please add one.