TriggerAreaDetectionUniqueEntityTrigger ​
Inherits: EventTrigger < Resource
Triggers when a specific entity (by unique_id) enters or exits a detection trigger area
Properties ​
int | trigger_area_id | 0 |
TriggerMode | trigger_mode | TriggerMode.ON_ENTER |
int | entity_unique_id | 0 |
Variables ​
String | trigger_area_name | "" |
TriggerArea | target_trigger_area | null |
Methods ​
String | get_display_name() |
String | get_function_description() |
void | setup() |
void | cleanup() |
void | find_target_trigger_area() |
void | connect_trigger_area_signals() |
void | disconnect_trigger_area_signals() |
bool | is_matching_entity( body: Node3D ) |
bool | is_triggered( event_data: Dictionary ) |
String | generate_objective_description() |
Enumerations ​
enum TriggerMode ​
The options of trigger mode: on enter, on exit, on both.
- ON_ENTER =
0 - ON_EXIT =
1 - ON_BOTH =
2
Property descriptions ​
int trigger_area_id = 0 ​
The trigger area ID to track
TriggerMode trigger_mode = TriggerMode.ON_ENTER ​
When to trigger (enter, exit, or both)
int entity_unique_id = 0 ​
Unique ID of the specific entity to detect
Variable descriptions ​
String trigger_area_name = "" ​
Trigger area name - auto-populated from the target trigger area if it exists
TriggerArea target_trigger_area = null ​
Reference to the target Trigger area
Method descriptions ​
String get_display_name() ​
The name of the trigger in the editor.
String get_function_description() ​
The sentence the editor shows for the trigger, with {placeholders} for its values.
void setup() ​
Starts listening: connects the signals the trigger waits for.
void cleanup() ​
Stops listening: disconnects the signals of the trigger.
void find_target_trigger_area() ​
Finds the trigger area the trigger watches by its id.
void connect_trigger_area_signals() ​
Connects the signals of the trigger area (an entity enters, an entity leaves).
void disconnect_trigger_area_signals() ​
Disconnects the signals of the trigger area.
bool is_matching_entity( body: Node3D ) ​
Is the body the entity the trigger waits for?
bool is_triggered( event_data: Dictionary ) ​
Does this event data satisfy the trigger? Called when the signal the trigger listens to fires.
String generate_objective_description() ​
The line of the quest objective this trigger makes ("Kill 5 wolves").