LocalPlayerStateInfo
Defined in: client/api.d.ts:4179
Curated view of the pawn’s CharacterStateInfo component. Getters return null without a pawn/component; each call re-resolves the live pawn.
Methods
Section titled “Methods”clearInvulnerable()
Section titled “clearInvulnerable()”clearInvulnerable():
boolean
Defined in: client/api.d.ts:4251
Ends a timed invulnerability window setInvulnerable started (no-op when none is active).
Returns
Section titled “Returns”boolean
getHealth()
Section titled “getHealth()”getHealth():
number|null
Defined in: client/api.d.ts:4213
Returns the local player’s current health.
Returns
Section titled “Returns”number | null
getLevel()
Section titled “getLevel()”getLevel():
number|null
Defined in: client/api.d.ts:4223
Returns the local player’s level (ObjectStateInfo::GetLevel).
Returns
Section titled “Returns”number | null
getMaxHealth()
Section titled “getMaxHealth()”getMaxHealth():
number|null
Defined in: client/api.d.ts:4218
Returns the local player’s maximum health.
Returns
Section titled “Returns”number | null
isDead()
Section titled “isDead()”isDead():
boolean|null
Defined in: client/api.d.ts:4183
Whether the local player is dead.
Returns
Section titled “Returns”boolean | null
isInvulnerable()
Section titled “isInvulnerable()”isInvulnerable():
boolean|null
Defined in: client/api.d.ts:4203
true during a timed invulnerability window (setInvulnerable(seconds)).
Returns
Section titled “Returns”boolean | null
isInvulnerableToDamage()
Section titled “isInvulnerableToDamage()”isInvulnerableToDamage():
boolean|null
Defined in: client/api.d.ts:4208
The persistent damage-immunity flag (setInvulnerableToDamage), distinct from the timed window.
Returns
Section titled “Returns”boolean | null
isNearDeathKneeling()
Section titled “isNearDeathKneeling()”isNearDeathKneeling():
boolean|null
Defined in: client/api.d.ts:4188
true while in the near-death kneel (the game’s downed state).
Returns
Section titled “Returns”boolean | null
isProtectedFromDeath()
Section titled “isProtectedFromDeath()”isProtectedFromDeath():
boolean|null
Defined in: client/api.d.ts:4198
Whether the death-protection flag is set.
Returns
Section titled “Returns”boolean | null
restoreHealthToMax()
Section titled “restoreHealthToMax()”restoreHealthToMax(
removeTak?):boolean
Defined in: client/api.d.ts:4246
Restores health to max.
Parameters
Section titled “Parameters”removeTak?
Section titled “removeTak?”boolean
Passed to the game’s bRemoveTAK; defaults to false.
Returns
Section titled “Returns”boolean
setHealth()
Section titled “setHealth()”setHealth(
amount,indicateHud?):boolean
Defined in: client/api.d.ts:4269
Sets current health through the game’s own SetHealth. Returns the game’s accepted/rejected verdict; false also when there’s no pawn.
Parameters
Section titled “Parameters”amount
Section titled “amount”number
New current health (clamped by the game).
indicateHud?
Section titled “indicateHud?”boolean
Whether the health bar reacts; defaults to true.
Returns
Section titled “Returns”boolean
setInvulnerable()
Section titled “setInvulnerable()”setInvulnerable(
seconds):boolean
Defined in: client/api.d.ts:4235
Grants the local player timed invulnerability for seconds, through the game’s own window: no damage lands until it runs out or clearInvulnerable ends it. Local only: the server’s player rules still decide what other players may do. Returns the game’s accepted/rejected verdict; false for a non-finite value.
Parameters
Section titled “Parameters”seconds
Section titled “seconds”number
Duration of the timed invulnerability window.
Returns
Section titled “Returns”boolean
setInvulnerableToDamage()
Section titled “setInvulnerableToDamage()”setInvulnerableToDamage(
invulnerable):boolean
Defined in: client/api.d.ts:4229
Sets/clears the persistent damage-immunity flag.
Parameters
Section titled “Parameters”invulnerable
Section titled “invulnerable”boolean
Set or clear the persistent damage-immunity flag.
Returns
Section titled “Returns”boolean