Skip to content

SpawnOptions beta ​

Interface of @v12-engine/engine

ts
export interface SpawnOptions

What world.spawn is told besides type, owner and position: facing, size, look and the rest

Members ​

data ​

ts
data?: Record<string, unknown>;

Components it starts with, by id, as Component.default would not give them: { 'warden.soul': { hero: 4 } }. They are on it before the hooks of its making run. An id the game does not have throws

facing ​

ts
facing?: number;

The way it faces, in radians; the engine's default facing when left out

lifetime ​

ts
lifetime?: number;

Seconds it lasts, when that is not what its type says

look ​

ts
look?: string;

Which of the models of its type it is drawn with, for things that come in kinds like trees

looksLike ​

ts
looksLike?: Entity;

Drawn as this entity is: its type's model, its owner's colour, its size and its look, while the new one stays what its own type and owner say it is (a soul in the fallen's shape). scale and look here win over the entity's

name ​

ts
name?: string;

A name of its own, for the rules to find it by: world.named('gate')

scale ​

ts
scale?: number;

How big it is drawn

underConstruction ​

ts
underConstruction?: boolean | {
        buildTime?: number;
        paid?: Cost;
    };

Structures only: start as a construction site, with its build time and what was paid when they are not its type's