Skip to content

five-on-it / packages/missions/src/runtime / SpawnNpcCommand

Interface: SpawnNpcCommand ​

Defined in: packages/missions/src/runtime.ts:944

Put an NPC actor in the level: a person of the contact role who stands at a place, or a guard or a civilian of stealth with its patrol (places after it) or post, its weapon by name and its pockets (the facts report it under the key); a driver at the wheel of a car of its class, on its route or after an actor; a target on its rounds, with its refuge; a VIP; a hostage, tied up or not, with its refuge; a witness on its rounds, with its refuge (its phone); any of them on a schedule.

Properties ​

at ​

at: SpawnSpot

Defined in: packages/missions/src/runtime.ts:966

Where it stands and faces.


bound? ​

optional bound?: boolean

Defined in: packages/missions/src/runtime.ts:952

A hostage starts tied up.


follow? ​

optional follow?: string

Defined in: packages/missions/src/runtime.ts:960

The key of the actor a driver follows.


key ​

key: string

Defined in: packages/missions/src/runtime.ts:948

The actor's key: the facts report the NPC under it.


kind ​

kind: "spawnNpc"

Defined in: packages/missions/src/runtime.ts:946

Discriminator.


loop? ​

optional loop?: boolean

Defined in: packages/missions/src/runtime.ts:970

A patrol loops back to its home, or walks back and forth.


patrol? ​

optional patrol?: object[]

Defined in: packages/missions/src/runtime.ts:968

A guard's or a civilian's patrol points after its home; empty for a post.

x ​

x: number

z ​

z: number


player? ​

optional player?: number

Defined in: packages/missions/src/runtime.ts:978

The player the mission belongs to (in a run, its holder 0: the host routes nothing by it).


pockets? ​

optional pockets?: readonly object[]

Defined in: packages/missions/src/runtime.ts:976

What its pockets hold.


refuge? ​

optional refuge?: object

Defined in: packages/missions/src/runtime.ts:962

A target's refuge.

x ​

x: number

z ​

z: number


role ​

role: "guard" | "civilian" | "driver" | "target" | "vip" | "contact" | "hostage" | "witness"

Defined in: packages/missions/src/runtime.ts:950

A contact, a guard, a civilian, a driver, a target, a VIP, a hostage or a witness.


route? ​

optional route?: object[]

Defined in: packages/missions/src/runtime.ts:958

A driver's (a target's) route: places in order.

x ​

x: number

z ​

z: number


schedule? ​

optional schedule?: ScheduleHourSpot[]

Defined in: packages/missions/src/runtime.ts:964

Its schedule, when it has one.


speed? ​

optional speed?: number

Defined in: packages/missions/src/runtime.ts:956

A driver's share of its car's top speed.


turn? ​

optional turn?: number

Defined in: packages/missions/src/runtime.ts:972

How far a post looks either way (rad).


vehicleClass? ​

optional vehicleClass?: string

Defined in: packages/missions/src/runtime.ts:954

A driver's car class by name.


weapon? ​

optional weapon?: string

Defined in: packages/missions/src/runtime.ts:974

A guard's or a civilian's weapon's name, or none.