PlayerGatheredTrigger ​
Inherits: PlayerEventTrigger < EventTrigger < Resource
Triggers when the player gathers from a gathering node (a GatherInteraction): any node, or one kind of node, a number of times. As an objective of a quest it shows the tally ("Gather 5 Moonpetal 3/5").
Properties ​
int | gather_node_id | 0 |
int | amount_required | 1 |
Variables ​
int | current_amount | 0 |
Methods ​
String | get_display_name() |
String | get_function_description() |
int | get_tally_target() |
int | get_tally_progress() |
void | reset() |
void | set_progress( amount: int ) |
void | setup_player_connection( player: Player ) |
void | cleanup_player_connection( player: Player ) |
bool | is_triggered( event_data: Dictionary ) |
String | generate_objective_description() |
bool | concerns_target( target: Variant ) |
Property descriptions ​
int gather_node_id = 0 ​
The kind of node (an interactable) to count. 0 = any gathering node
int amount_required = 1 ​
How many times the player has to gather before the trigger fires
Variable descriptions ​
int current_amount = 0 ​
How many gathers were counted so far
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.
int get_tally_target() ​
The number the quest objective counts up to (0 when it does not count).
int get_tally_progress() ​
How far the count of the quest objective is now.
void reset() ​
Sets the count back to zero.
void set_progress( amount: int ) ​
Sets the count (when a quest is restored from a save).
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 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").
bool concerns_target( target: Variant ) ​
True for a gathering node of the tracked definition (any node is not listed: 0 means every node)