This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
add_object [2020/04/22 14:33] – justin | add_object [2023/01/02 21:15] (current) – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | Adds an object to the specified tile within the map (if the tile is not already occupied by another object). The entity ID is optional and will be assigned to the new object if supplied. | + | Adds an [[object|object]] |
====Signature: | ====Signature: | ||
Line 10: | Line 10: | ||
^Argument^Description^Type^Required^ | ^Argument^Description^Type^Required^ | ||
- | |model_name|Model to use for the new object.|[[String]]|Yes| | + | |model_name|Model to use for the new [[object|object]].|[[string|String]]|Yes| |
- | |tile|ID or coordinate of the tile where the object will be placed.|[[String]] | + | |tile|ID or [[coordinate|coordinate]] |
- | |entity_id|Unique entity ID that will be assigned.|[[String]]|No| | + | |entity_id|Unique |
+ | |||
+ | ^Return Value^Description^Type^ | ||
+ | |Object Added|Returns a reference to the [[object]] that was added.|[[Entity]]| | ||
<WRAP center round info 100%> | <WRAP center round info 100%> | ||
- | The [[Remove Entity]] function can be triggered later to remove an object that was previously added to the scene with the Add Object function. | + | The [[remove_entity|Remove Entity]] function can be triggered later to remove an [[object|object]] |
</ | </ | ||
====Example: | ====Example: | ||
<code bauxite> | <code bauxite> | ||
- | add_object(" | + | add_object(" |
</ | </ | ||
- | // | + | // |
<WRAP center round tip 100%> | <WRAP center round tip 100%> | ||
- | Use the **Add Object** function to introduce new interactable objects or obstacles into the scene. After being added, you can use the [[Set Entity Script]] function to assign a script to the object or the [[Modify Navigation]] function to mark a now blocked path as impassable. | + | Use the **Add Object** function to introduce new interactable |
</ | </ | ||
Line 33: | Line 36: | ||
<WRAP half column> | <WRAP half column> | ||
====Editor Node:==== | ====Editor Node:==== | ||
- | {{:wiki: | + | {{: |
</ | </ | ||
<WRAP half column> | <WRAP half column> | ||
====Visual Demo:==== | ====Visual Demo:==== | ||
- | {{:wiki: | + | {{: |
</ | </ | ||
</ | </ | ||
~~NOTOC~~ | ~~NOTOC~~ |