spawn
Since 0.6Changed in 0.7
Use it in a scene entity's components list as { "type": "spawn", … }. The contract writes the fields flat and refuses unknown keys.
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
for | string | yes | |||
player | integer | no | With for: "player": which player this entity is (default 1). 1 to 4 are local players: player N's devices drive it once meta.players seats them, and a behaviour can rebind with ctx.players.bind. In a networked session, player N of the session (1 to 1024) drives it; a number above 4 means nothing outside one. |
Rules that can refuse it
floor-gapinput-read-without-routinginput-reader-not-playerplayer-spawnspawn-no-sourcespawn-prefab-cyclespawn-two-sourcesspawn-unknown-sourcespawn-unsupportedterrain/entity-floatingterrain/spawn-slopeunreachable-goalvfx-capacity-shortvfx-event-invalidvfx-source-missingvfx-stateless-invalid
Example
From the contract's tested fixture fixtures/contract/full20/scene.json#spawn-player.
{
"type": "spawn",
"for": "player"
}