DropItemTask ​
Inherits: BehaviorTask < Resource
The entity puts an item on the ground where it stands: a farmer who leaves a crate, a thief who drops loot. The item comes from the bag of the entity (it must have it) or is made out of nothing, as the setting says. Fails when dropped items are switched off.
Properties ​
int | item_id | 0 |
int | quantity | 1 |
bool | from_inventory | true |
int | item_level | 0 |
bool | launch | false |
Methods ​
void | execute_task_start() |
void | execute_task_complete() |
void | execute_task_interrupt() |
void | execute_task_fail() |
Property descriptions ​
Item
int item_id = 0 ​
The item to drop
int quantity = 1 ​
How many of the item
bool from_inventory = true ​
True takes the item out of the bag of the entity (the task fails when it has none); false makes new ones
int item_level = 0 ​
The item level a generated item is made at when it is made new (0 = the level of its definition)
bool launch = false ​
True throws the item up so it falls and bounces (if the Gameplay Config uses physics), false puts it down
Method descriptions ​
void execute_task_start() ​
Puts the item on the ground
void execute_task_complete() ​
Nothing to do when the task is done
void execute_task_interrupt() ​
Nothing to interrupt
void execute_task_fail() ​
Nothing to clean up