SpawnOptions
What a spawn takes beside its prefab: a pose and the traits that go over the prefab’s.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Default value | Description |
|---|---|---|---|
audience? |
AudienceLike |
undefined |
Which pages its Reach.Audience traits reach, over the prefab’s, as setAudience sets it. |
body? |
BodyOptions |
undefined |
A body over the prefab’s, its kind among it. |
collider? |
ColliderDeclaration |
undefined |
Colliders over the prefab’s. |
farDistance? |
number |
undefined |
The distance in metres past which a page receives its pose at farSendsPerSecond: from the nearest entity the page’s player controls or views to its bounds, as interest measures it. A page takes the far rate a fifth past it and the near rate again within it, at the entity’s next far send. Set with farSendsPerSecond. |
farSendsPerSecond? |
number |
sendsPerSecond |
How many times a second a room sends its pose to a page that stands past farDistance from it, where that is fewer than sendsPerSecond: its place and its velocity alone, which the page draws over the longer interval, that much later. Every other trait keeps sendsPerSecond. A room rounds it to a whole number of the entity’s own sends. 4 at the least, and set with farDistance. It takes effect in a room that culls by interest, and a room that does not says so in development. |
membersOnly? |
boolean |
undefined |
Whether it touches only its own match, over the prefab’s: see the prefab’s membersOnly. |
movementMode? |
NpcMovementMode |
undefined |
How it moves while it needs no physics, over the prefab’s: see the prefab’s movementMode. |
name? |
undefined |
undefined |
Only a prefab has a name, which is how a spawn tells the two apart. |
owner? |
Entity | null |
undefined |
The entity it belongs to, which findOwner reads, as Unreal’s SpawnActor takes an owner: a match, so its reset takes the entity away, or the character that fired it. An owner that is gone or another world’s throws. A system answering a match’s command that spawns with none warns in development, since the match’s reset would leave the entity behind: null says it belongs to no match on purpose. |
position? |
PositionInput |
undefined |
- |
positionPrecision? |
number |
0.01 |
The step its position is rounded to as it is sent, in metres: it travels as the nearest multiple, so a move that stays within one step sends nothing. A multiple of 0.0001. Keep it below the distance it moves between two sends, or it is drawn stopping and starting. Its rotation and scale travel at 0.001. |
relevance? |
Relevance |
undefined |
Its relevance under interest culling, over the prefab’s: see the prefab’s relevance. |
rotation? |
RotationInput |
undefined |
- |
scale? |
ScaleInput |
undefined |
- |
sendsPerSecond? |
number |
the room’s sendsPerSecond |
How many times a second a room sends its changes, where the room’s own rate is higher: a zombie at 20 in a room at 60 goes on every third send, and each page draws its move over that interval, one interval late. The room rounds it to a whole number of its own sends and, in development, says which rate it used. Its spawn and its removal go at once whatever the rate. So do a teleport, an event emitted on it and a change of who sees it, each with what it held back. A trait only its owner receives travels at the room’s rate. 4 at the least. An entity a player controls keeps the room’s rate, or the player’s input shows late. |
traits? |
readonly ConfigurableTrait[] |
undefined |
Traits over the prefab’s, field by field: HealthTrait({ current: 10 }) over the prefab’s HealthTrait({ current: 30, maximum: 30 }) keeps its maximum of 30, as a Unity prefab override changes one field. Each spawn copies each record. |
unseen? |
Unseen |
undefined |
What it does while no page wants it, over the prefab’s: see the prefab’s unseen. |
visibility? |
AudienceLike |
undefined |
Which pages hold it, over the prefab’s, as setVisibility sets it: only red’s pages hold a marker spawned with visibility: red. Set as it spawns, no page is ever sent it before. |