five-on-it / apps/level-editor/src/scripts/blocks/npc / default
Class: default
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:22
The block's script: its presence on a node is what marks the node; its fields say who stands there.
Implements
IScript
Constructors
Constructor
new default(
mesh):NpcBlock
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:64
Parameters
mesh
Mesh
Returns
NpcBlock
Properties
items
items:
string=''
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:33
What its pockets hold: item ids separated by spaces, each with an optional *<count>.
loop
loop:
number=1
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:41
1: the patrol loops back to its spot; 0: it walks back and forth.
mesh
readonlymesh:Mesh
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:62
patrol
patrol:
string=''
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:37
Its patrol: x z points in the game's frame, separated by semicolons; empty for a post.
refuge
refuge:
string=''
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:53
Where a target runs to when threatened: x z in the game's frame; empty for its spot.
role
role:
string='guard'
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:25
guard, civilian, driver, target or vip.
schedule
schedule:
string=''
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:57
Its day: HH:MM goto|post|home x z or HH:MM patrol x z x z…, separated by semicolons.
turn
turn:
number=0
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:45
At a post: how far it looks either way of the node's +z (degrees).
vehicle
vehicle:
string=''
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:49
A driver's vehicle class (taxi, sedan); empty for anyone else.
weapon
weapon:
string='pistol'
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:29
Its weapon's name (pistol, rifle, shotgun, fists), or none.
Methods
onStart()
onStart():
void
Defined in: apps/level-editor/src/scripts/blocks/npc.ts:60
Nothing to do at play time: the block is read by npm run level:export.
Returns
void
Implementation of
IScript.onStart