User Tools

Site Tools


move_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
move_character [2018/03/16 09:46]
justin
move_character [2020/04/22 17:45] (current)
justin
Line 2: Line 2:
 ---- ----
  
-Moves the character to the specified tile at their assigned movement speed. If a walkable path is not open then the character will remain at their current position.+Moves a [[character]] to the specified ​[[tile]] at their assigned movement speed. If a walkable path is not open the [[character]] will remain at their current position.
  
 ====Signature:​==== ====Signature:​====
 <code python> <code python>
-move_character(character, ​tile_id)+move_character(character, ​tile)
 </​code>​ </​code>​
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|character|Character (player or NPC) that will be moved.|[[Entity]]|Yes| +|character|[[Character]] (player or NPC) that will be moved.|[[Entity]]|Yes| 
-|tile_id|ID of the destination tile.|[[String]]|Yes|+|tile|ID or [[coordinate]] ​of the destination tile or a reference to the destination [[tile]] itself.|[[String]], [[Coordinate]],​ or [[Entity]]|Yes|
  
 <WRAP center round info 100%> <WRAP center round info 100%>
-If you are moving the player character, [[set_player_movement_locked|Lock/​Unlock Player Movement]] must be called first to prevent the player from interfering with the scripted movement. You can also use the more convenient [[Move Player]] function.+If you are moving the [[player character]], [[set_player_movement_locked|Lock/​Unlock Player Movement]] must be called first to prevent the player from interfering with the scripted movement. You can also use the more convenient [[Move Player]] function.
 </​WRAP>​ </​WRAP>​
  
 ====Example:​==== ====Example:​====
-<​code ​python+<​code ​bauxite
-move_character(entity["​Sarah"], "​bridge01"​)+move_character(entity["​sarah"], "​bridge01"​)
 </​code>​ </​code>​
-//​Results://​ The character with an ID of "Sarah" walks from her current location to the bridge tile with an ID of "​bridge01"​.+//​Results://​ The [[character]] with an ID of "sarah" walks from her current location to the bridge ​[[tile]] with an ID of "​bridge01"​.
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Move Character** function to move the player character or NPCs around the map during scripted ​segments ​or cutscenes+Use the **Move Character** function to move the [[player character]] or [[npc|NPCs]] around the [[map]] during scripted ​sequences ​or cutscenes.
 </​WRAP>​ </​WRAP>​
  
move_character.1521218778.txt.gz · Last modified: 2018/03/16 09:46 by justin