Skip to content

Class: CALifeMonsterDetailPathManager

ALife monster detail-path manager binding.

Source

C++ class CALifeMonsterDetailPathManager

Custom Constructor

CALifeMonsterDetailPathManager

Remarks

Owned by an offline monster brain. Targets are validated against the game graph and current level graph.

Constructors

Constructor

ts
new CALifeMonsterDetailPathManager(): CALifeMonsterDetailPathManager;

Returns

CALifeMonsterDetailPathManager

Methods

actual()

ts
actual(): boolean;

Check whether the current detail path still matches the target.

Returns

boolean

Whether the path is actual.


completed()

ts
completed(): boolean;

Check whether the detail path reached its target.

Returns

boolean

Whether detail movement is complete.


failed()

ts
failed(): boolean;

Check whether the last path build failed.

Returns

boolean

Whether detail movement failed.


speed()

Call Signature

ts
speed(speed: number): void;

Set detail movement speed.

Parameters
ParameterTypeDescription
speednumberNew movement speed.
Returns

void

Call Signature

ts
speed(): number;

Get detail movement speed.

Returns

number

Current movement speed.


target()

Call Signature

ts
target(
   game_vertex_id: number, 
   level_vertex_id: number, 
   position: vector): void;

Set a target by graph vertex, level vertex, and position.

Parameters
ParameterTypeDescription
game_vertex_idnumberTarget game graph vertex id.
level_vertex_idnumberTarget level vertex id.
positionvectorTarget position.
Returns

void

Throws

If the graph vertex is invalid or does not match the level vertex and position on the current level.

Call Signature

ts
target(game_vertex_id: number): void;

Set a target by game graph vertex.

Parameters
ParameterTypeDescription
game_vertex_idnumberTarget game graph vertex id.
Returns

void

Throws

If game_vertex_id is not valid.

Call Signature

ts
target(task: CALifeSmartTerrainTask): void;

Set a target from a smart-terrain task.

Parameters
ParameterTypeDescription
taskCALifeSmartTerrainTaskSmart-terrain task.
Returns

void

Remarks

The task is resolved to graph vertex, level vertex, and position before assigning the target.