Skip to content

PlayerStatChangedTrigger ​

Inherits: PlayerEventTrigger < EventTrigger < Resource

Triggers when target player(s) stat changes

Properties ​

intstat_id0
Condition.CheckLogicstat_check_logicCondition.CheckLogic.EQUAL
floattarget_stat_value0.0

Methods ​

Stringget_display_name()
Stringget_function_description()
voidsetup_player_connection( player: Player )
voidcleanup_player_connection( player: Player )
boolmeets_stat_condition( current_value: float )
boolis_triggered( event_data: Dictionary )
Stringgenerate_objective_description()

Property descriptions ​

int stat_id = 0 ​

The stat to watch.

Condition.CheckLogic stat_check_logic = Condition.CheckLogic.EQUAL ​

How the stat is compared with the target value (equal, at least, less than ...).

float target_stat_value = 0.0 ​

The value to compare with.

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_player_connection( player: Player ) ​

Connects the signal of a player this trigger listens to.

void cleanup_player_connection( player: Player ) ​

Disconnects the signal of a player.

bool meets_stat_condition( current_value: float ) ​

Does this value satisfy the trigger?

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").