User Tools

Site Tools


add_tile

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
add_tile [2018/03/16 09:44] justinadd_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]] at the specified [[coordinate|coordinate]] within the [[map|map]] (if a [[tile|tile]] does not already exist at that [[coordinate|coordinate]]). The [[entity|entity]] ID is optional and will be assigned to the new [[tile|tile]] if supplied.
  
 ====Signature:==== ====Signature:====
Line 10: Line 10:
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|model_name|Model to use for the new tile.|[[String]]|Yes| +|model_name|Model to use for the new [[tile|tile]].|[[string|String]]|Yes| 
-|coordinate|Position of the new tile.|[[Coordinate]]|Yes| +|coordinate|Position of the new [[tile|tile]].|[[coordinate|Coordinate]]|Yes| 
-|entity_id|Unique entity ID that will be assigned.|[[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%> <WRAP center round info 100%>
-After adding a new tile, you can use the [[Modify Navigation]] function to make the tile walkable from any adjacent tiles. For example, if you add a bridge tile on top of a river, you'll need to update the navigation to allow the player character to walk across it.+After adding a new [[tile|tile]], you can use the [[modify_navigation|Modify Navigation]] function to make the [[tile|tile]] walkable from any adjacent [[tile|tiles]]. For example, if you add a bridge [[tile|tile]] on top of a river, you'll need to update the [[navigation_and_interaction|navigation]] to allow the [[character|characters]] to walk across it.
 </WRAP> </WRAP>
  
 ====Example:==== ====Example:====
-<code python+<code bauxite
-add_tile("wooden_floor_02", coord[10, 0, -1], "bridge")+add_tile("wooden_floor_02", coord[10, 0, -1], "bridge");
 </code> </code>
-//Results:// A new tile, using model "wooden_floor_02", will be added to the map at coordinate (10, 0, -1) and given an ID of "bridge".+//Results:// A new [[tile|tile]], using model "wooden_floor_02", will be added to the [[map|map]] at [[coordinate|coordinate]] (10, 0, -1) and given an ID of "bridge".
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
Line 33: Line 36:
 <WRAP half column> <WRAP half column>
 ====Editor Node:==== ====Editor Node:====
-{{:wiki:add_tile_node.png?nolink|}}+{{:add_tile_node.png?nolink|}}
 </WRAP> </WRAP>
  
 <WRAP half column> <WRAP half column>
 ====Visual Demo:==== ====Visual Demo:====
-{{:wiki:add_tile_demo.gif?nolink|}}+{{:add_tile_demo.gif?nolink|}}
 </WRAP> </WRAP>
 </WRAP> </WRAP>
  
 ~~NOTOC~~ ~~NOTOC~~
add_tile.1521218648.txt.gz · Last modified: 2018/03/16 09:44 by justin