UseAbilityTask ​
Inherits: BehaviorTask < Resource
UseAbilityTask uses a specific ability on the current target. This is a common behavior task for combat and utility abilities.
Properties ​
int | ability_id | 0 |
bool | face_target | true |
bool | move_into_range | true |
float | min_distance | 0.5 |
Variables ​
AbilityInstance | ability_instance | null |
bool | positioned_for_ability | false |
bool | facing_complete | false |
Methods ​
void | execute_task_start() |
void | execute_task_complete() |
void | execute_task_interrupt() |
void | execute_task_fail() |
AbilityInstance | get_ability_instance() |
float | get_target_distance() |
Property descriptions ​
Ability
int ability_id = 0 ​
The ID of the ability to use
bool face_target = true ​
Whether to face the target before using ability
Range Check
bool move_into_range = true ​
Whether to move into range if target is too far
float min_distance = 0.5 ​
Minimum distance to maintain from target
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 target.
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_target_distance() ​
The distance to the target (-1 when there is none).