Skip to content

AgentSave beta ​

Interface of @v12-engine/engine

ts
export interface AgentSave

An agent as it is right now, for a save: where it is, how fast it goes, where to, and how it behaves

Members ​

acceleration ​

ts
acceleration?: number;

How fast it gets up to speed, where that is not what follows from the speed

anchor ​

ts
anchor?: Vec2;

Where an anchored agent holds its ground

anchored ​

ts
anchored: boolean;

Whether it holds its ground, so that others walk around it

flying ​

ts
flying?: boolean;

Whether it flies, over what blocks the ground

ghost ​

ts
ghost: boolean;

Whether it ignores other agents

ts
naval?: boolean;

Whether it sails, on deep water instead of the ground

phasing ​

ts
phasing?: boolean;

Whether it walks through every other agent and they through it (Navigation.setPhasing)

radius ​

ts
radius: number;

Its radius, in cells

speed ​

ts
speed: number;

How fast it goes, in cells per second

target ​

ts
target: Vec2 | null;

Where it was sent, snapped to where it can go. Null when it was not

vx ​

ts
vx: number;

Its velocity along x, in cells per second

vz ​

ts
vz: number;

Its velocity along z, in cells per second

x ​

ts
x: number;

Where the agent is on the map's x axis, in cells

z ​

ts
z: number;

Where the agent is on the map's z axis, in cells