Skip to content

EntityDeathTypeTrigger ​

Inherits: EventTrigger < Resource

Triggers when a certain amount of entities of a specific type are killed

Properties ​

intentity_id0
intamount_required1

Variables ​

intcurrent_amount0
Stringdisplay_name""

Methods ​

Stringget_display_name()
Stringget_function_description()
voidsetup()
voidreset()
voidset_progress( amount: int )
voidcleanup()
voidconnect_signals()
voidupdate_entity_name()
voidadd_kill( killed_entity_id: int )
boolis_triggered( event_data: Dictionary )
Stringgenerate_objective_description()
boolconcerns_target( target: Variant )

Property descriptions ​

int entity_id = 0 ​

The entity type ID to track

int amount_required = 1 ​

Total amount needed to trigger the event

Variable descriptions ​

int current_amount = 0 ​

Current kill count

String display_name = "" ​

Entity name - will be auto-populated from the database

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 reset() ​

The count starts again (the objective or event that owns this trigger starts over)

void set_progress( amount: int ) ​

The count from a save

void cleanup() ​

Clean up any listeners or connections

void connect_signals() ​

Connect to signals

void update_entity_name() ​

Update the entity name from the database using the display_name field

void add_kill( killed_entity_id: int ) ​

Add a kill to the counter and check completion

bool is_triggered( event_data: Dictionary ) ​

Check if this trigger is currently active

String generate_objective_description() ​

Generate quest objective description

bool concerns_target( target: Variant ) ​

True for an entity made from the tracked definition