EntityResourceChangedTrigger ​
Inherits: EventTrigger < Resource
Triggers when a specific entity's resource changes to a specific value or meets certain conditions
Properties ​
int | entity_unique_id | 0 |
Condition.CheckLogic | resource_check_logic | Condition.CheckLogic.EQUAL |
int | target_resource | 0 |
Variables ​
Entity | target_entity | null |
String | display_name | "" |
Array[Entity] | connected_entities | [] |
Methods ​
String | get_display_name() |
String | get_function_description() |
void | setup() |
void | cleanup() |
void | find_target_entity() |
bool | meets_resource_condition( current_resource: int ) |
bool | is_triggered( event_data: Dictionary ) |
String | generate_objective_description() |
Property descriptions ​
int entity_unique_id = 0 ​
Unique identifier of the specific entity to track
Condition.CheckLogic resource_check_logic = Condition.CheckLogic.EQUAL ​
Comparison logic for resource check
int target_resource = 0 ​
Resource amount 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_resource_condition( current_resource: int ) ​
Check if the current resource 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