PreGame.GetTeam (Civ5 API)

From Civilization Modding Wiki
Revision as of 10:46, 20 September 2012 by DonQuich (talk | contribs) (Bot update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This page is a part of the Lua and UI Reference (Civ5).


Function.png This function is a member of PreGame.

This is a static method, invoke it with a dot.


Usage

TeamID PreGame.GetTeam(PlayerID player)


Returned Value

No description available.

Parameters

player: No description available.


Source code samples

AdvancedSetup.lua

UI/FrontEnd/GameSetup/AdvancedSetup.lua
0998
slotInstance.TeamLabel:LocalizeAndSetText( "TXT_KEY_MULTIPLAYER_DEFAULT_TEAM_NAME", PreGame.GetTeam(playerID) + 1 );
1000
Controls.TeamLabel:LocalizeAndSetText( "TXT_KEY_MULTIPLAYER_DEFAULT_TEAM_NAME", PreGame.GetTeam(playerID) + 1 );
1007
local team = PreGame.GetTeam(playerID);
1025
Controls.TeamLabel:LocalizeAndSetText( "TXT_KEY_MULTIPLAYER_DEFAULT_TEAM_NAME", PreGame.GetTeam(0) + 1 );
1027
local team = PreGame.GetTeam(i);
1033
local playerTeam = PreGame.GetTeam(0);
1037
if( PreGame.GetTeam(i) ~= playerTeam ) then


StagingRoom.lua

UI/FrontEnd/Multiplayer/StagingRoom.lua
0223
local teamTest = PreGame.GetTeam( 0 );
0227
if( PreGame.GetTeam( i ) ~= teamTest ) then
0363
local teamID = PreGame.GetTeam(playerID) + 1; -- Real programmers count from zero.
0528
local teamID = PreGame.GetTeam(Matchmaking.GetLocalID()) + 1; -- Real programmers count from zero.



The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.