User Tools

Site Tools


add_character

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
add_character [2018/03/16 09:35]
justin
add_character [2020/05/28 20:06] (current)
justin
Line 2: Line 2:
 ---- ----
  
-Adds a character to the specified tile within the map (if the tile is not already occupied by another character). The entity ID is optional and will be assigned to the new character if supplied.+Adds a [[character]] to the specified ​[[tile]] within the [[map]] (if the [[tile]] is not already occupied by another ​[[character]]). The [[entity]] ID is optional and will be assigned to the new [[character]] if supplied.
  
 ====Signature:​==== ====Signature:​====
 <code python> <code python>
-add_character(model_name, ​tile_id, entity_id)+add_character(model_name, ​tile, entity_id)
 </​code>​ </​code>​
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|model_name|Model to use for the new character.|[[String]]|Yes| +|model_name|Model to use for the new [[character]].|[[String]]|Yes| 
-|tile_id|ID of the tile where the character will be placed.|[[String]]|Yes| +|tile|ID or [[coordinate]] ​of the [[tile]] where the [[character]] will be placed.|[[String]], [[Coordinate]]|Yes| 
-|entity_id|Unique entity ID that will be assigned.|[[String]]|No|+|entity_id|Unique ​[[entity]] ID that will be assigned.|[[String]]|No|
  
 <WRAP center round info 100%> <WRAP center round info 100%>
-The [[Remove Entity]] function can be triggered later to remove a character that was previously added to the scene with the Add Character function.+The [[Remove Entity]] function can be triggered later to remove a [[character]] that was previously added to the scene with the Add Character function.
 </​WRAP>​ </​WRAP>​
  
 ====Example:​==== ====Example:​====
-<​code ​python>+<​code ​bauxite>
 add_character("​purple_slime",​ "​dungeon_door_01",​ "​slime_01"​) add_character("​purple_slime",​ "​dungeon_door_01",​ "​slime_01"​)
 </​code>​ </​code>​
-//​Results://​ A purple slime will be added to the map on the tile having ID "​dungeon_door_01"​ and will be assigned an ID of "​slime_01"​.+//​Results://​ A purple slime will be added to the [[map]] on the [[tile]] having ID "​dungeon_door_01"​ and will be assigned an ID of "​slime_01"​.
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Add Character** function to introduce new NPCs into the scene. After being added, you can use the [[Set Dialogue]] function to assign a dialogue to the character or the [[Set Character Name]] function to change their name.+Use the **Add Character** function to introduce new [[npc|NPCs]] into the scene. After being added, you can use the [[Set Dialogue]] function to assign a [[dialogue]] to the [[character]] or the [[Set Character Name]] function to change their name.
 </​WRAP>​ </​WRAP>​
  
Line 33: Line 33:
 <WRAP half column> <WRAP half column>
 ====Editor Node:==== ====Editor Node:====
-{{:wiki:​add_character_node.png?​nolink|}}+{{:​add_character_node.png?​nolink|}}
 </​WRAP>​ </​WRAP>​
  
 <WRAP half column> <WRAP half column>
 ====Visual Demo:==== ====Visual Demo:====
-{{:wiki:​add_character_demo.gif?​nolink|}}+{{:​add_character_demo.gif?​nolink|}}
 </​WRAP>​ </​WRAP>​
 </​WRAP>​ </​WRAP>​
  
 ~~NOTOC~~ ~~NOTOC~~
add_character.1521218151.txt.gz · Last modified: 2018/03/16 09:35 by justin