Skip to content

PlayerBecameCurrentTrigger ​

Inherits: PlayerEventTrigger < EventTrigger < Resource

Triggers when a player becomes the current/active player (character switching)

Methods ​

Stringget_display_name()
Stringget_function_description()
voidsetup()
voidcleanup()
boolis_target_player( player: Player )
intget_player_slot_index( player: Player )
boolis_triggered( event_data: Dictionary )
Stringgenerate_objective_description()

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.

bool is_target_player( player: Player ) ​

Is this player one of the players the trigger watches?

int get_player_slot_index( player: Player ) ​

The place of the player in the party (-1 when not in it).

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