Player.IsAlive (Civ5 API)

From Civilization Modding Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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


Function.png This function is a member of Player.

This is an instance method, invoke it with a colon.


Usage

int Player:IsAlive()


Returned Value

No description available.


Source code samples

Too many occurences. Only 50 out of 160 are listed.

CityBannerManager.lua

UI/InGame/CityBannerManager.lua
1245
if( player:IsAlive() )


CityStateDiploPopup.lua

UI/InGame/Popups/CityStateDiploPopup.lua
0381
if (pOtherPlayer:IsAlive()) then


CivsAlive.lua - DLC_01 DLC

DLC/DLC_01/Scenarios/Mongol Scenario/CivsAlive.lua
0012
if (Players[iPlayerLoop]:IsAlive()) then


Demographics.lua

UI/InGame/Popups/Demographics.lua
0047
if(pPlayer:IsAlive() and not pPlayer:IsMinorCiv()) then


DiploGlobalRelationships.lua

UI/InGame/Popups/DiploGlobalRelationships.lua
0038
if (iOtherPlayer ~= g_iUs and pOtherPlayer:IsAlive()) then
0150
if (pThirdPlayer ~= nil and pThirdPlayer:IsAlive()) then


DiploList.lua

UI/InGame/DiploList.lua
0251
if (iPlayerLoop ~= g_iPlayer and pOtherPlayer:IsAlive()) then
0423
pOtherPlayer:IsAlive()    and


DiploRelationships.lua

UI/InGame/Popups/DiploRelationships.lua
0054
if (pPlayer:GetTeam() ~= iOtherTeam and pOtherPlayer:IsAlive()) then
0136
if (iPlayerLoop ~= iPlayer and pOtherPlayer:IsAlive()) then


DiploVotePopup.lua

UI/InGame/Popups/DiploVotePopup.lua
0056
if (pOtherPlayer ~= nil and pOtherPlayer:IsAlive()) then


DiscussionDialog.lua

UI/InGame/LeaderHead/DiscussionDialog.lua
0425
if (pPlayer:GetTeam() ~= iThirdPartyTeam and pThirdPartyPlayer:IsAlive()) then
0855
if (not pThirdPartyPlayer:IsAlive()) then


EndGameMenu.lua

UI/InGame/Popups/EndGameMenu.lua
0018
if (not pPlayer:IsAlive()) then
0027
if (iActivePlayer ~= iNextPlayer and pPlayer:IsAlive() and pPlayer:IsHuman()) then
0180
if (not Game:IsNetworkMultiPlayer() and player:IsAlive() and PreGame.GetGameOption("GAMEOPTION_NO_EXTENDED_PLAY") ~= 1) then
0291
if (Game.IsHotSeat() and Game.CountHumanPlayersAlive() > 0 and not pPlayer:IsAlive()) then


GameplayUtils.lua (G&K)

DLC/Expansion/Scenarios/SteampunkScenario/GameplayUtils.lua
0196
if (Players[iPlayer] ~= nil and Players[iPlayer]:IsAlive()) then


MPList.lua

UI/InGame/WorldView/MPList.lua
0038
if( pPlayer:IsAlive() ) then
0086
if (pPlayer:IsAlive() and pPlayer:IsHuman()) then
0179
if( pPlayer:HasReceivedNetTurnComplete() or not pPlayer:IsAlive() ) then


ReligionOverview.lua (G&K)

DLC/Expansion/UI/InGame/Popups/ReligionOverview.lua
0490
if (pPlayer:IsAlive()) then


TradeLogic.lua

UI/InGame/WorldView/TradeLogic.lua
0472
pLoopPlayer:IsAlive()) then
2554
if( pLoopPlayer:IsAlive() ) then


TradeLogic.lua (G&K)

DLC/Expansion/UI/InGame/WorldView/TradeLogic.lua
2005
if (player:GetTeam() == iOtherTeam and player:IsAlive()) then
2806
if(pLoopPlayer:IsAlive() and otherPlayerButton ~= nil) then


TurnsRemaining.lua - DLC_02 DLC

DLC/DLC_02/Scenarios/NewWorldScenario/TurnsRemaining.lua
0016
if (player:IsAlive()) then
0335
if (pLoopPlayer:IsAlive() and pLoopPlayer:GetStartingPlot():GetX() > 50) then
0408
if (pPlayer:IsAlive() and not pPlayer:IsMinorCiv() and (iPlayer == iNWOwner or iNWOwner == -1 or iNWOwner > 7)) then


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/SteampunkScenario/TurnsRemaining.lua
0170
if (pPlayer ~= nil and pPlayer:IsAlive()) then
0198
if (pPlayer and pPlayer:IsAlive()) then
0682
if (Players[iPlayer]:IsAlive() and gbLogSaveData) then


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/FallOfRomeScenario/TurnsRemaining.lua
0288
if (pPlayer:IsAlive() and IsEmpire(iPlayerLoop)) then


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/MedievalScenario/TurnsRemaining.lua
1123
if (pPlayer:IsAlive() and pPlayer:GetNumCities() == 0) then


TutorialChecks.lua

Tutorial/TutorialChecks.lua
1064
if (player:GetTeam() ~= iOtherTeam and pOtherPlayer:IsAlive()) then
1125
if (pOtherPlayer:IsMinorCiv() and pOtherPlayer:IsAlive() and not pTeam:IsAtWar(iOtherTeam)) then
2809
if (team ~= iOtherTeam and pOtherPlayer:IsAlive()) then
3002
if (pPlayer:GetTeam() ~= iOtherTeam and pOtherPlayer:IsAlive() and pOtherPlayer:IsFriends()) then


UnitFlagManager.lua

UI/InGame/UnitFlagManager.lua
0908
not Players[ playerID ]:IsAlive() )
0934
not Players[ playerID ]:IsAlive() or


VictoryProgress.lua

UI/InGame/Popups/VictoryProgress.lua
0267
pPlayer:IsHasLostCapital() or not pPlayer:IsAlive(),
0374
not pPlayer:IsAlive() or Teams[pPlayer:GetTeam()]:GetLiberatedByTeam() ~= -1,
0447
if(not v:IsMinorCiv() and v:IsAlive() and (leadAI == nil or v:GetNumPolicyBranchesFinished() > maxPolicies) and i ~= Game.GetActivePlayer()) then
0580
SetCivIcon(pPlayer, 45, controlTable.Icon, nil, controlTable.IconOut, not pPlayer:IsAlive(),
0685
not pPlayer:IsAlive() or Teams[pTeam]:GetLiberatedByTeam() ~= -1,
0711
if(curPlayer:IsAlive()) then
0797
SetCivIcon(pPlayer, 45, controlTable.Icon, nil, controlTable.IconOut,  not pPlayer:IsAlive(),


VictoryProgress.lua (G&K)

DLC/Expansion/UI/InGame/Popups/VictoryProgress.lua
0690
not pPlayer:IsAlive() or Teams[iTeam]:GetLiberatedByTeam() ~= -1,


VictoryStatus.lua (G&K)

DLC/Expansion/Scenarios/SteampunkScenario/VictoryStatus.lua
0111
if (Players[iPlayer]:IsAlive()) then


WhosWinningPopup.lua

UI/InGame/Popups/WhosWinningPopup.lua
0153
if (pLoopPlayer:IsAlive()) then



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.