User Tools

Site Tools


reset_entity_rotation

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
Last revisionBoth sides next revision
reset_entity_rotation [2017/05/07 16:26] justinreset_entity_rotation [2020/05/15 09:36] justin
Line 2: Line 2:
 ---- ----
  
-Resets the entity's rotation to its original cardinal direction (north, south, west, or east) over the specified duration (in seconds).+Resets the [[entity|entity's]] rotation to its original [[cardinal direction]] (north, south, west, or east) over the specified duration (in seconds).
  
 +====Signature:====
 <code python> <code python>
 reset_entity_rotation(entity, duration) reset_entity_rotation(entity, duration)
Line 9: Line 10:
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|entity|Entity for which the rotation will be reset.|[[Entity]]|Yes| +|entity|[[Entity]] for which the rotation will be reset.|[[Entity]]|Yes| 
-|duration|Duration of the rotation (in seconds).|[[Decimal]]|Yes|+|duration|Duration of the rotation (in seconds).|[[Number]]|Yes|
  
 <WRAP center round info 100%> <WRAP center round info 100%>
-This function assumes that the entity was previously rotated using [[Rotate Entity Towards]] to face it towards another entity in the scene.+This function assumes that the [[entity]] was previously rotated using [[Rotate Entity Towards]] to face it towards another [[entity]] in the scene.
 </WRAP> </WRAP>
  
 ====Example:==== ====Example:====
-<code python>+<code bauxite>
 reset_entity_rotation(entity["dungeon_slime"], 0.5) reset_entity_rotation(entity["dungeon_slime"], 0.5)
 </code> </code>
-//Results:// The entity with an ID of "dungeon_slime" is rotated to face its original direction (north, south, west, or east) over a duration of 0.5 seconds.+//Results:// The [[entity]] with an ID of "dungeon_slime" is rotated to face its original direction (north, south, west, or east) over a duration of 0.5 seconds.
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Reset Entity Rotation** function to reset the player character or an NPC back to the direction they were facing prior to a cutscene, in particular when they were manually rotated to look at an object or another character.+Use the **Reset Entity Rotation** function to reset the [[player character]] or an [[NPC]] back to the direction they were facing prior to a cutscene, in particular when they were manually rotated to look at an [[object]] or another [[character]].
 </WRAP> </WRAP>
  
reset_entity_rotation.txt · Last modified: 2021/04/21 18:43 by justin