Skip to content

sc_spawn_service_v1.set_entity_transform

1.2. Moves and turns an entity: pos (metres) and rot (a unit quaternion, x y z w, the order of sc_spatial.h’s player_pose) in zone zone_id’s frame. zone_id 0 is the world (root) frame; any other id is that zone’s local frame (ids from teleport.spatial: player_pose, zone_of_entity). The entity stays in the zone it’s in; the pose is converted to that zone’s frame. 1 on success, 0 on failure: wrong thread, a null pointer, rot not finite or of zero length (it is normalized), an id that isn’t streamed in, a zone the game pack can’t place, or an entity you may not move; the game pack logs the reason (“[game] warning: set_entity_transform(<id>) -> 0: <reason>”) once per id and reason. A fresh spawn takes seconds to stream in and answers 0 until then: check entity_alive(id) first, and try again on a later tick while it answers 0. You may move: - an entity spawned through spawn_as with your own self, while your plugin is loaded (unloading forgets them; spawn_near_player and the spawn.ship command count for nobody); - your player’s own vehicle once the product has registered it as retrieved or delivered by ATC (sco::game::services::RegisterPlayerVehicle; registration depends on the product). self is your plugin’s handle, as sco_plugin_load received it. A 1.1 table ends before this field: call it only when the table is non-null, size >= offsetof(sc_spawn_service_v1, set_entity_transform) + sizeof(table->set_entity_transform), and table->set_entity_transform is non-null.

int (*)(sco_plugin *, uint64_t, uint64_t, const double *, const double *)

Service index

Property Value
Symbol sc_spawn_service_v1.set_entity_transform
Record ID sc-spawn-service-v1-set-entity-transform
Service spawn.entities
Table sc_spawn_service_v1
Version macro SC_SPAWN_SERVICE_VERSION
Packed table version 65538
Since / availability size &gt;= 56; 1.2
Complete member extent (x64 bytes) 56
Table size (x64 bytes) 64

Header source

int (*set_entity_transform)(sco_plugin* self, uint64_t entity_id, uint64_t zone_id, const double pos[3], const double rot[4]);
1.2. Moves and turns an entity: pos (metres) and rot (a unit quaternion, x y z w, the order of sc_spatial.h’s player_pose) in zone zone_id’s frame. zone_id 0 is the world (root) frame; any other id is that zone’s local frame (ids from teleport.spatial: player_pose, zone_of_entity). The entity stays in the zone it’s in; the pose is converted to that zone’s frame. 1 on success, 0 on failure: wrong thread, a null pointer, rot not finite or of zero length (it is normalized), an id that isn’t streamed in, a zone the game pack can’t place, or an entity you may not move; the game pack logs the reason (“[game] warning: set_entity_transform(<id>) -> 0: <reason>”) once per id and reason. A fresh spawn takes seconds to stream in and answers 0 until then: check entity_alive(id) first, and try again on a later tick while it answers 0. You may move: - an entity spawned through spawn_as with your own self, while your plugin is loaded (unloading forgets them; spawn_near_player and the spawn.ship command count for nobody); - your player’s own vehicle once the product has registered it as retrieved or delivered by ATC (sco::game::services::RegisterPlayerVehicle; registration depends on the product). self is your plugin’s handle, as sco_plugin_load received it. A 1.1 table ends before this field: call it only when the table is non-null, size >= offsetof(sc_spawn_service_v1, set_entity_transform) + sizeof(table->set_entity_transform), and table->set_entity_transform is non-null.

Absent table: query_service NOT_FOUND; requires spawner rows (product gate spawn.ship). Wrong thread or missing readiness: 0 or borrowed reason string. Additional failures/output state unspecified unless described in the buffer contract.

Absent table: query_service NOT_FOUND Wrong thread or missing readiness: 0 or borrowed reason string.

May move only own spawn_as entities or player vehicles registered by product; input arrays borrowed during call; no allocation transfer.

Game thread only; recursive reentrancy unspecified.

unspecified

unspecified

No cancellation entrypoint; asynchronous streaming is not cancelled by this table.

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_spawn.h
(*set_entity_transform)
cpp direct include/sc_spawn.h
(*set_entity_transform)
csharp unsupported docs/sdk-csharp.md
The host-owned services each have a class.
docs/sdk-csharp.md
| Class | Service | Does |
lua unsupported sdk/docs/lua.md
The script sees only:
sdk/docs/lua.md
There is no io, os, package, require, debug, dofile, loadfile or FFI
plugins/lua/sco_lua_game.c
if (!(actors || vehicles || world || entities || creative)) return;

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

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