PlayerHasXItemsTrigger ​
Inherits: PlayerEventTrigger < EventTrigger < Resource
Triggers when target player(s) have X amount of a specific item
Properties ​
int | item_id | 0 |
int | required_quantity | 1 |
Condition.CheckLogic | check_logic | Condition.CheckLogic.GREATER_EQUAL |
Methods ​
int | get_tally_target() |
int | get_tally_progress() |
void | reset() |
void | poll() |
String | get_display_name() |
String | get_function_description() |
void | setup_player_connection( player: Player ) |
void | cleanup_player_connection( player: Player ) |
bool | meets_quantity_condition( current_quantity: int ) |
bool | is_triggered( event_data: Dictionary ) |
String | generate_objective_description() |
Property descriptions ​
int item_id = 0 ​
The item to count.
int required_quantity = 1 ​
The number to compare the count with.
Condition.CheckLogic check_logic = Condition.CheckLogic.GREATER_EQUAL ​
How the count is compared with the number (equal, at least, more than ...).
Method descriptions ​
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 poll() ​
The player may hold the items already when an objective starts to listen
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_quantity_condition( current_quantity: int ) ​
Does this count 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").