Skip to content

EntityDistanceToEntityCondition ​

Inherits: EntityCondition < Condition < Resource

Checks distance between the target entity and another specific entity. Uses EntityCondition targeting to determine the first entity, then compares distance to a second entity by ID.

Properties ​

boolentities_targettrue
inttarget_entity_unique_id0
Condition.CheckLogicdistance_check_logicCondition.CheckLogic.LESS_EQUAL
floattarget_distance10.0

Methods ​

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

Property descriptions ​

Target Entity

bool entities_target = true ​

Entity Target

int target_entity_unique_id = 0 ​

Unique ID of the second entity to measure distance to

Distance Check

Condition.CheckLogic distance_check_logic = Condition.CheckLogic.LESS_EQUAL ​

Logic for comparing the distance

float target_distance = 10.0 ​

Target distance to compare against

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.

bool is_valid() ​

Are the settings of the condition complete?

String get_expected_argument_type() ​

The kind of thing the condition is checked against (an entity, an encounter ...).