Skip to content

EntityDistanceToInteractableCondition ​

Inherits: EntityCondition < Condition < Resource

Checks distance between the target entity and a specific interactable object. Uses EntityCondition targeting to determine the entity, then compares distance to an interactable by ID.

Properties ​

inttarget_interactable_unique_id0
Condition.CheckLogicdistance_check_logicCondition.CheckLogic.LESS_EQUAL
floattarget_distance5.0

Methods ​

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

Property descriptions ​

Target Interactable

int target_interactable_unique_id = 0 ​

Unique ID of the interactable object to measure distance to

Distance Check

Condition.CheckLogic distance_check_logic = Condition.CheckLogic.LESS_EQUAL ​

Logic for comparing the distance

float target_distance = 5.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 ...).