Skip to content

TargetDistanceCondition ​

Inherits: EntityCondition < Condition < Resource

Checks if the target is closer/farther than a specified range. Consolidates various distance conditions.

Properties ​

floatrange_threshold8.0
booltarget_farthertrue

Methods ​

Stringget_entity_function_description()
boolevaluate_entity( entity: Entity )
Stringget_entity_description()

Property descriptions ​

float range_threshold = 8.0 ​

The distance to compare with

bool target_farther = true ​

If true, checks if target is FARTHER than range; if false, checks CLOSER

Method descriptions ​

String get_entity_function_description() ​

The sentence the editor shows for the condition, with {placeholders} for its values.

bool evaluate_entity( entity: Entity ) ​

Is the condition met for this entity?

String get_entity_description() ​

A short text about what the condition checks on the entity.