TakeItemsAction ​
Inherits: PlayerEventAction < EventAction < Resource
Action that takes items out of the bag of player(s): a toll, a payment, items handed over to an NPC. Quest items that are kept aside are taken too.
Properties ​
int | item_id | 0 |
int | quantity | 1 |
bool | all_or_nothing | true |
Methods ​
String | get_player_function_description() |
bool | execute_on_players( players: Array[Player] ) |
Dictionary | save() |
void | load_data( data: Dictionary ) |
Property descriptions ​
int item_id = 0 ​
The item to take
int quantity = 1 ​
How many to take
bool all_or_nothing = true ​
Take nothing when the player has fewer than that (on), or take what they have (off). The action fails when nothing could be taken from a player
Method descriptions ​
String get_player_function_description() ​
The sentence the editor shows for the action, with {placeholders} for its values.
bool execute_on_players( players: Array[Player] ) ​
Takes the items from each player. With all or nothing set, nobody pays unless every player can. False when it fails.
Dictionary save() ​
The state of the action for a save.
void load_data( data: Dictionary ) ​
Restores the state of the action from a save.