Skip to content

Class: CALifeSmartTerrainTask

ALife smart-terrain task binding.

Source

C++ class CALifeSmartTerrainTask

Custom Constructor

CALifeSmartTerrainTask

Remarks

Tasks are resolved against patrol paths and graph vertices immediately. Invalid paths or vertices assert in the engine.

Constructors

Constructor

ts
new CALifeSmartTerrainTask(patrol_path_name: string, patrol_point_index?: number): CALifeSmartTerrainTask;

Create a task from a patrol path.

Parameters

ParameterTypeDescription
patrol_path_namestringPatrol path name.
patrol_point_index?numberOptional patrol point index.

Returns

CALifeSmartTerrainTask

Throws

If the patrol path or requested patrol point does not exist.

Constructor

ts
new CALifeSmartTerrainTask(game_vertex_id: number, level_vertex_id: number): CALifeSmartTerrainTask;

Create a task from graph vertices.

Parameters

ParameterTypeDescription
game_vertex_idnumberTarget game graph vertex id.
level_vertex_idnumberTarget level vertex id.

Returns

CALifeSmartTerrainTask

Throws

If game_vertex_id is not valid in the game graph.

Methods

game_vertex_id()

ts
game_vertex_id(): number;

Get the target game graph vertex.

Returns

number

Game graph vertex id.

Throws

If the task points to an invalid graph vertex.


level_vertex_id()

ts
level_vertex_id(): number;

Get the target level vertex.

Returns

number

Level vertex id.

Throws

If the task points to an invalid graph vertex.


position()

ts
position(): vector;

Get the target position.

Returns

vector

Task position.