Skip to content

Class: CALifeMonsterPatrolPathManager

ALife monster patrol-path manager binding.

Source

C++ class CALifeMonsterPatrolPathManager

Custom Constructor

CALifeMonsterPatrolPathManager

Remarks

Patrol target getters require a patrol path and a selected current patrol vertex.

Constructors

Constructor

ts
new CALifeMonsterPatrolPathManager(): CALifeMonsterPatrolPathManager;

Returns

CALifeMonsterPatrolPathManager

Methods

actual()

ts
actual(): boolean;

Check whether the patrol target is still actual.

Returns

boolean

Whether the patrol path is actual.


completed()

ts
completed(): boolean;

Check whether patrol movement reached the target.

Returns

boolean

Whether patrol movement is complete.


path()

ts
path(path_name: string): void;

Set the patrol path by name.

Parameters

ParameterTypeDescription
path_namestringPatrol path name.

Returns

void

Throws

If path_name is not a registered patrol path.


route_type()

Call Signature

ts
route_type(type: TXR_patrol_route_type): void;

Set patrol route behavior.

Parameters
ParameterTypeDescription
typeTXR_patrol_route_typePatrol route type.
Returns

void

Call Signature

ts
route_type(): TXR_patrol_route_type;

Get patrol route behavior.

Returns

TXR_patrol_route_type

Patrol route type.


start_type()

Call Signature

ts
start_type(type: TXR_patrol_start_type): void;

Set how the patrol path starts.

Parameters
ParameterTypeDescription
typeTXR_patrol_start_typePatrol start type.
Returns

void

Call Signature

ts
start_type(): TXR_patrol_start_type;

Get how the patrol path starts.

Returns

TXR_patrol_start_type

Patrol start type.


start_vertex_index()

ts
start_vertex_index(index: number): void;

Set the starting patrol point.

Parameters

ParameterTypeDescription
indexnumberPatrol point index.

Returns

void

Remarks

Used when start type is the explicit point mode. The index must exist in the current patrol path.


target_game_vertex_id()

ts
target_game_vertex_id(): number;

Get the current patrol target game vertex.

Returns

number

Target game graph vertex id.

Throws

If no patrol path is assigned or the current vertex is not selected.


target_level_vertex_id()

ts
target_level_vertex_id(): number;

Get the current patrol target level vertex.

Returns

number

Target level vertex id.

Throws

If no patrol path is assigned or the current vertex is not selected.


target_position()

ts
target_position(): vector;

Get the current patrol target position.

Returns

vector

Target position.

Throws

If no patrol path is assigned or the current vertex is not selected.


use_randomness()

Call Signature

ts
use_randomness(enabled: boolean): void;

Enable or disable random patrol point selection.

Parameters
ParameterTypeDescription
enabledbooleanNew randomness state.
Returns

void

Call Signature

ts
use_randomness(): boolean;

Check whether random patrol point selection is enabled.

Returns

boolean

Whether randomness is enabled.