Skip to content

sc_actors_v1.health

1.1. The health pool of the actor whose entity id is id: your player’s (local_player’s entity id) or an NPC’s (spawn_npc’s id), once it has streamed in. *out_cur = the game’s HealthPool stat in its own units. *out_max = 0: the maximum isn’t read yet, 0 means unknown (the field is here so a later game pack can fill it without a new table). Either pointer may be NULL to skip it, not both. Read-only: no self; a failure’s reason is last_error(NULL, …). SCO_NOT_FOUND: id isn’t streamed in or isn’t an actor. SCO_UNAVAILABLE: game.actors.health isn’t ready. SCO_BAD_ARG: both pointers NULL. SCO_FAILED: the game faulted. Implementation: outputs zeroed before failure checks; id 0 BAD_ARG. Maximum 0 is unknown.

sco_result (*)(uint64_t, float *, float *)

Service index

Property Value
Symbol sc_actors_v1.health
Record ID sc-actors-v1-health
Service game.actors
Table sc_actors_v1
Version macro SC_ACTORS_VERSION_1_1
Packed table version 65537
Since / availability size >= 48; 1.1
Complete member extent (x64 bytes) 48
Table size (x64 bytes) 56

Header source

sco_result (*health)(uint64_t id, float* out_cur, float* out_max);
1.1. The health pool of the actor whose entity id is id: your player’s (local_player’s entity id) or an NPC’s (spawn_npc’s id), once it has streamed in. *out_cur = the game’s HealthPool stat in its own units. *out_max = 0: the maximum isn’t read yet, 0 means unknown (the field is here so a later game pack can fill it without a new table). Either pointer may be NULL to skip it, not both. Read-only: no self; a failure’s reason is last_error(NULL, …). SCO_NOT_FOUND: id isn’t streamed in or isn’t an actor. SCO_UNAVAILABLE: game.actors.health isn’t ready. SCO_BAD_ARG: both pointers NULL. SCO_FAILED: the game faulted. Implementation: outputs zeroed before failure checks; id 0 BAD_ARG. Maximum 0 is unknown.

Absent table: query_service NOT_FOUND; missing operation capability: UNAVAILABLE; invalid/released self: BAD_ARG. See method detail for game failures. Additional failures/output state unspecified unless described in the buffer contract.

Absent table: query_service NOT_FOUND

Caller buffers; no allocation crosses boundary. Host owns NPC tracking; entity IDs are session values. Internal allocation unspecified.

Game thread only (WRONG_THREAD elsewhere); last_error any thread. Recursive reentrancy unspecified.

unspecified

unspecified

No in-flight cancellation entrypoint; owned NPCs removed on ordinary unload/non-retained crash cleanup; despawn starts deferred removal. Retained-provider faults skip owner resource-release hooks and require restart; backing resources remain retained, not safe for cached calls.

Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.

Language Catalogue status Source evidence / wrapper tokens
c direct include/sc_actors.h
(*health)
cpp typed-wrapper include/scosdk/game/actors.hpp
return t_->health(id, &cur, &max);
csharp typed-wrapper sdk/csharp/Sco.Sdk/Game/Actors.cs
ScoResult r = !Covers(40) || _t->health == null ? ScoResult.Unavailable : _t->health(id, &c, &m);
lua typed-wrapper plugins/lua/sco_lua_game.c
const sco_result r = GAME_MEMBER(a, sc_actors_v1, health) ? a->health(id, &cur, &max) : SCO_UNAVAILABLE;

None identified in the catalogue; this is not proof none can exist.

ABI pins prove layout, not semantic behavior or a live game session.