Skip to content

SetPlayerStamina

Sets the player’s stamina.

Clamped to 0 .. max. A swing thrown with less stamina than it costs lands weakly - a mode may tire a player on purpose. A player who is not in the world yet is ignored (the call still returns true).

SetPlayerStamina(pid, stamina)
Parameter Type
pid number the player
stamina number the new stamina

boolean - false when there is no such player; true otherwise, also for a player not yet in the world, whom the call ignores

-- both duelists start fresh
SetPlayerStamina(a, GetPlayerMaxStamina(a))
SetPlayerStamina(b, GetPlayerMaxStamina(b))

GetPlayerStamina · HealPlayer · the Vitals group of the index