Skip to content

DistanceFromPositionCondition ​

Inherits: EncounterCondition < Condition < Resource

Checks if group is within certain distance of a position

Properties ​

Vector3target_positionVector3.ZERO
floatmax_distance10.0
boolcheck_all_membersfalse # true = all must be in range, false = any one

Methods ​

boolevaluate_encounter( encounter: EncounterGroup )
Stringget_encounter_description()
Stringget_encounter_function_description()

Property descriptions ​

Vector3 target_position = Vector3.ZERO ​

The world position to measure from

float max_distance = 10.0 ​

The greatest distance from the position that counts as near

bool check_all_members = false # true = all must be in range, false = any one ​

True: every member of the group must be near. False: one is enough

Method descriptions ​

bool evaluate_encounter( encounter: EncounterGroup ) ​

Is the condition met for this encounter?

String get_encounter_description() ​

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

String get_encounter_function_description() ​

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