Skip to content

EntityStatChangedTrigger ​

Inherits: EventTrigger < Resource

Triggers when a specific entity's stat changes

Properties ​

intentity_unique_id0
intstat_id0
Condition.CheckLogicstat_check_logicCondition.CheckLogic.EQUAL
Varianttarget_stat_value0

Variables ​

Entitytarget_entitynull
Stringdisplay_name""
Array[Entity]connected_entities[]

Methods ​

Stringget_display_name()
Stringget_function_description()
voidsetup()
voidcleanup()
voidfind_target_entity()
boolmeets_stat_condition( current_stat_value: Variant )
boolis_triggered( event_data: Dictionary )
Stringgenerate_objective_description()

Property descriptions ​

int entity_unique_id = 0 ​

Unique identifier of the specific entity to track

int stat_id = 0 ​

Stat to track

Condition.CheckLogic stat_check_logic = Condition.CheckLogic.EQUAL ​

Comparison logic for stat check

Variant target_stat_value = 0 ​

Target stat value to compare against

Variable descriptions ​

Entity target_entity = null ​

Reference to the target entity

String display_name = "" ​

Entity name - will be auto-populated from the entity itself if found

Array[Entity] connected_entities = [] ​

Track connected entities to disconnect later

Method descriptions ​

String get_display_name() ​

Return the display name for this trigger

String get_function_description() ​

Return the function description with parameter placeholders

void setup() ​

Set up any listeners or connections needed by this trigger

void cleanup() ​

Clean up any listeners or connections

void find_target_entity() ​

Try to find the target entity in the world

bool meets_stat_condition( current_stat_value: Variant ) ​

Check if the current stat meets the comparison logic

bool is_triggered( event_data: Dictionary ) ​

Check if this trigger is currently active

String generate_objective_description() ​

Generate quest objective description