Skip to content

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 ​

intitem_id0
intquantity1
boolfrom_inventorytrue
intitem_level0
boollaunchfalse

Methods ​

voidexecute_task_start()
voidexecute_task_complete()
voidexecute_task_interrupt()
voidexecute_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