User Tools

Site Tools


add_item_to_tile

Add Item To Tile


Places an item drop on the specified tile. Item drops are displayed as billboard sprites and can be picked up by the player by interacting with them.

Signature:

add_item_to_tile(tile, item, count)
ArgumentDescriptionTypeRequired
tileTile where the item will be placed.EntityYes
itemID of the item (as defined in the Item Editor).StringYes
countHow many of the item to place on the tile (defaults to 1).NumberNo

Example:

add_item_to_tile(entity["under_tree"], "ITEM_0001", 5);

Results: Five of ITEM_0001 are placed onto the tile having ID “under_tree”.

Use the Add Item To Tile function to pre-populate a map with helpful item pickups for the player using the map's pre-load script.


Editor Node:

add_item_to_tile.txt · Last modified: 2024/01/29 15:45 by justin