SetActionBarSlotAction ​
Inherits: PlayerEventAction < EventAction < Resource
Action that puts an ability on a slot of the action bar of player(s), empties a slot, or locks and unlocks it. The ability does not have to be known yet: the slot waits for it and the ability goes there when it is learned. Use it for a bar that changes with the story (a new ability on the same key), or for a fixed bar.
Properties ​
int | slot_number | 1 |
int | ability_id | 0 |
LockChange | lock | LockChange.KEEP |
Methods ​
String | get_player_function_description() |
bool | execute_on_players( players: Array[Player] ) |
Dictionary | save() |
void | load_data( data: Dictionary ) |
Enumerations ​
enum LockChange ​
The options of lock change: keep, lock, unlock.
- KEEP =
0- The slot stays as it is (locked or not) - LOCK =
1- The player cannot change the slot any more - UNLOCK =
2- The player can change the slot again
Property descriptions ​
int slot_number = 1 ​
The slot (1 is the first)
int ability_id = 0 ​
The ability to put on the slot. 0 = empty the slot
LockChange lock = LockChange.KEEP ​
Locks or unlocks the slot for the 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] ) ​
Puts the ability on the slot (or empties or locks it) for each player. False when the slot number is not valid.
Dictionary save() ​
The state of the action for a save.
void load_data( data: Dictionary ) ​
Restores the state of the action from a save.