User Tools

Site Tools


add_item_to_tile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
add_item_to_tile [2024/01/29 12:09] – created justinadd_item_to_tile [2024/01/29 15:45] (current) justin
Line 1: Line 1:
 ======Add Item To Tile====== ======Add Item To Tile======
 ---- ----
-(WIP)+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:==== ====Signature:====
Line 10: Line 10:
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
 |tile|[[Tile]] where the [[item]] will be placed.|[[Entity]]|Yes| |tile|[[Tile]] where the [[item]] will be placed.|[[Entity]]|Yes|
-|item||[[String]]|Yes| +|item|ID of the [[item]] (as defined in the [[Item Editor]]).|[[String]]|Yes| 
-|count||[[Number]]|No| +|count|How many of the [[item]] to place on the [[tile]] (defaults to 1).|[[Number]]|No|
- +
-<WRAP center round info 100%> +
-The [[add_item_to_tile|Add Item To Tile]] function... +
-</WRAP>+
  
 ====Example:==== ====Example:====
 <code bauxite> <code bauxite>
-add_character("purple_slime", "dungeon_door_01", "slime_01");+add_item_to_tile(entity["under_tree"], "ITEM_0001", 5);
 </code> </code>
-//Results:// A purple slime will be added to the [[map|map]] on the [[tile|tile]] having ID "dungeon_door_01" and will be assigned an ID of "slime_01".+//Results:// Five of ITEM_0001 are placed onto the [[tile]] having ID "under_tree".
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Add Character** function to introduce new [[npc|NPCs]] into the scene. After being added, you can use the [[set_dialogue|Set Dialogue]] function to assign a [[dialogue|dialogue]] to the [[character|character]] or the [[set_character_name|Set Character Name]] function to change their name.+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]].
 </WRAP> </WRAP>
  
Line 32: Line 28:
 <WRAP half column> <WRAP half column>
 ====Editor Node:==== ====Editor Node:====
-{{:add_character_node.png?nolink|}}+{{:add_item_to_tile_node.png?nolink|}}
 </WRAP> </WRAP>
  
 <WRAP half column> <WRAP half column>
-====Visual Demo:==== 
-{{:add_character_demo.gif?nolink|}} 
 </WRAP> </WRAP>
 </WRAP> </WRAP>
  
 ~~NOTOC~~ ~~NOTOC~~
add_item_to_tile.1706558956.txt.gz · Last modified: 2024/01/29 12:09 by justin