Skip to content

UseAbilityAtPointTask ​

Inherits: BehaviorTask < Resource

UseAbilityAtPointTask uses a specific ability at a target point. Useful for ground-targeted abilities, teleports, summons, etc.

Properties ​

intability_id0
Vector3target_pointVector3.ZERO
boolface_target_pointtrue
boolmove_into_rangetrue
floatmin_distance0.5

Variables ​

AbilityInstanceability_instancenull
boolpositioned_for_abilityfalse
boolfacing_completefalse

Methods ​

voidexecute_task_start()
voidexecute_task_complete()
voidexecute_task_interrupt()
voidexecute_task_fail()
AbilityInstanceget_ability_instance()
floatget_point_distance()
voidset_target_point( point: Vector3 )

Property descriptions ​

Ability

int ability_id = 0 ​

The ID of the ability to use

Vector3 target_point = Vector3.ZERO ​

The world position to target with the ability

bool face_target_point = true ​

Whether to face the target point before using ability

Range Check

bool move_into_range = true ​

Whether to move into range if point is too far

float min_distance = 0.5 ​

Minimum distance to maintain from target point

Variable descriptions ​

AbilityInstance ability_instance = null ​

The ability the entity uses.

bool positioned_for_ability = false ​

True once the entity is in place to use the ability.

bool facing_complete = false ​

True once the entity faces the point.

Method descriptions ​

void execute_task_start() ​

Starts the task.

void execute_task_complete() ​

Called when the task finishes well.

void execute_task_interrupt() ​

Called when something interrupts the task.

void execute_task_fail() ​

Called when the task fails.

AbilityInstance get_ability_instance() ​

The ability the entity uses.

float get_point_distance() ​

The distance to the point (-1 when there is no entity).

void set_target_point( point: Vector3 ) ​

Set the target point dynamically