Skip to content

DropItemAction ​

Inherits: EventAction < Resource

Puts an item (or a pile of a currency) on the ground as a dropped item: a quest reward left on a table, a key that falls from the ceiling, coins that spill from a chest. It lies where you say (a position, where an NPC stands, or where the player stands) and is picked up the way the Gameplay Config says. It fails when dropped items are switched off.

Properties ​

intitem_id0
intquantity1
intitem_level0
intcurrency_id0
intcurrency_amount0
PlaceplacePlace.POSITION
Vector3drop_positionVector3.ZERO
intentity_unique_id0
boollaunchtrue

Methods ​

Stringget_function_description()
Dictionarysave()
voidload_data( data: Dictionary )

Enumerations ​

enum Place ​

Where the item is put

  • POSITION = 0 - At the position below
  • AT_ENTITY = 1 - Where the NPC with the unique id below stands
  • AT_PLAYER = 2 - Where the player in control stands

Property descriptions ​

int item_id = 0 ​

The item to drop (leave 0 to drop currency)

int quantity = 1 ​

How many of the item

int item_level = 0 ​

The item level a generated item is made at (0 = the level of its definition)

int currency_id = 0 ​

The currency to drop when no item is set

int currency_amount = 0 ​

How much of the currency

Place place = Place.POSITION ​

Where the item is put

Vector3 drop_position = Vector3.ZERO ​

The position, when the place is Position

int entity_unique_id = 0 ​

The unique id of the NPC, when the place is At entity

bool launch = true ​

True throws the item up so it falls and bounces (if the Gameplay Config uses physics), false puts it where it is

Method descriptions ​

String get_function_description() ​

The sentence the editor shows for the action, with {placeholders} for its values.

Dictionary save() ​

The state of the action for a save.

void load_data( data: Dictionary ) ​

Restores the state of the action from a save.