GetPlayerLivesLeft: Difference between revisions

From Zandronum Wiki
(Created page with "{{Stub}} int '''GetPlayerLivesLeft''' (int ''player'') *''player'': player to query lives left of. Returns the amount the player has left. Lives are only reduced on respawn...")
 
(Move to Category: ACS functions (caps))
Tag: Source edit
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Stub}}
{{ACSWarning}}
int '''GetPlayerLivesLeft''' (int ''player'')


int '''GetPlayerLivesLeft''' (int ''player'')
== Usage ==
=== Parameters ===
*''player'': player to query the lives of.
 
=== Return value ===
Returns the number of lives the player has left. Lives are only reduced upon respawning; a value of 2 indicates the player has 3 lives, and a value of 0 indicates the player is on their last life.


*''player'': player to query lives left of.
To check whether a player is dead or not, use [[PlayerIsSpectator]].


Returns the amount the player has left. Lives are only reduced on respawning, an amount of 2 here indicates the player has 3 lives. An amount of 0 indicates last life.
== Examples ==
{{noexamples}}


To check whether a player is dead or not, [[PlayerIsSpectator]] should be used.
== See also ==
* [[SetPlayerLivesLeft]]


[[Category: ACS Functions]]
[[Category: ACS functions]]

Latest revision as of 01:21, 3 July 2022

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

int GetPlayerLivesLeft (int player)

Usage

Parameters

  • player: player to query the lives of.

Return value

Returns the number of lives the player has left. Lives are only reduced upon respawning; a value of 2 indicates the player has 3 lives, and a value of 0 indicates the player is on their last life.

To check whether a player is dead or not, use PlayerIsSpectator.

Examples

This article lists no examples, please add one.

See also