This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| add_tile [2017/07/29 23:22] – justin | add_tile [2023/01/02 21:13] (current) – justin | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ---- | ---- | ||
| - | Adds a tile at the specified coordinate within the map (if a tile does not already exist at that coordinate). The entity ID is optional and will be assigned to the new tile if supplied. | + | Adds a [[tile|tile]] |
| + | ====Signature: | ||
| <code python> | <code python> | ||
| add_tile(model_name, | add_tile(model_name, | ||
| Line 9: | Line 10: | ||
| ^Argument^Description^Type^Required^ | ^Argument^Description^Type^Required^ | ||
| - | |model_name|Description.|[[String]]|Yes| | + | |model_name|Model to use for the new [[tile|tile]].|[[string|String]]|Yes| |
| - | |coordinate|Description.|[[Coordinate]]|Yes| | + | |coordinate|Position of the new [[tile|tile]].|[[coordinate|Coordinate]]|Yes| |
| - | |entity_id|Description.|[[String]]|No| | + | |entity_id|Unique [[entity|entity]] ID that will be assigned.|[[string|String]]|No| |
| + | |||
| + | ^Return Value^Description^Type^ | ||
| + | |Tile Added|Returns a reference to the [[tile]] that was added.|[[Entity]]| | ||
| + | |||
| + | <WRAP center round info 100%> | ||
| + | After adding a new [[tile|tile]], | ||
| + | </ | ||
| + | |||
| + | ====Example: | ||
| + | <code bauxite> | ||
| + | add_tile(" | ||
| + | </ | ||
| + | // | ||
| + | |||
| + | <WRAP center round tip 100%> | ||
| + | Use the **Add Tile** function to place a bridge across a river or chasm after the player performs a certain action, opening up a new area for them to explore. | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP half column> | ||
| + | ====Editor Node:==== | ||
| + | {{: | ||
| + | </ | ||
| + | |||
| + | <WRAP half column> | ||
| + | ====Visual Demo:==== | ||
| + | {{: | ||
| + | </ | ||
| + | </ | ||
| ~~NOTOC~~ | ~~NOTOC~~ | ||