======Add Object======
----
Adds an [[object|object]] to the specified [[tile|tile]] within the [[map|map]] (if the [[tile|tile]] is not already occupied by another [[object|object]]). The [[entity|entity]] ID is optional and will be assigned to the new [[object|object]] if supplied.
====Signature:====
add_object(model_name, tile, entity_id)
^Argument^Description^Type^Required^
|model_name|Model to use for the new [[object|object]].|[[string|String]]|Yes|
|tile|ID or [[coordinate|coordinate]] of the [[tile|tile]] where the [[object|object]] will be placed.|[[string|String]], [[coordinate|Coordinate]]|Yes|
|entity_id|Unique [[entity|entity]] ID that will be assigned.|[[string|String]]|No|
^Return Value^Description^Type^
|Object Added|Returns a reference to the [[object]] that was added.|[[Entity]]|
The [[remove_entity|Remove Entity]] function can be triggered later to remove an [[object|object]] that was previously added to the scene with the Add Object function.
====Example:====
add_object("tree_small", "target_tile", "new_tree");
//Results:// A small tree will be added to the [[map|map]] on the [[tile|tile]] having ID "target_tile" and will be assigned an ID of "new_tree".
Use the **Add Object** function to introduce new interactable [[object|objects]] or obstacles into the scene. After being added, you can use the [[set_entity_script|Set Entity Script]] function to assign a [[script|script]] to the [[object|object]] or the [[modify_navigation|Modify Navigation]] function to mark a now blocked path as impassable.
----
====Editor Node:====
{{:add_object_node.png?nolink|}}
====Visual Demo:====
{{:add_object_demo.gif?nolink|}}
~~NOTOC~~