Difference between revisions of "GetFacing"

From NWN Lexicon
Jump to: navigation, search
m (Remarks: clarification from merricksdad)
 
(2 intermediate revisions by the same user not shown)
Line 30: Line 30:
  
 
From version 1.62+, this now rounds the value to the nearest degree.
 
From version 1.62+, this now rounds the value to the nearest degree.
 +
 +
<br />'''merricksdad''' reports the following observations in discord on 2019-July-7:
 +
<br />
 +
* Facing 0 is north
 +
* Players and other CreatureObjects have their faciong measure in the ''Clockwise'' direction
 +
* Doors and placeables (static or dynamic) have their facing measured in the ''Counterclockwise'' direction
 +
* When measuring the facing of a creature in conversation, GetFacing() will return the creature's facing measured before the conversation starts, rather than the facing of the Creature during conversationm, if it has changed..
  
 
<br />
 
<br />

Latest revision as of 19:13, 7 July 2019



GetFacing(object)

Used to determine which direction something is facing.

float GetFacing(
    object oTarget
);

Parameters

oTarget

The object to return the facing value of.


Description

Returns a float between 0.0 and 360.0 that determines which direction oTarget is facing.
Returns -1.0 on error.



Remarks

From version 1.62+, this now rounds the value to the nearest degree.


merricksdad reports the following observations in discord on 2019-July-7:

  • Facing 0 is north
  • Players and other CreatureObjects have their faciong measure in the Clockwise direction
  • Doors and placeables (static or dynamic) have their facing measured in the Counterclockwise direction
  • When measuring the facing of a creature in conversation, GetFacing() will return the creature's facing measured before the conversation starts, rather than the facing of the Creature during conversationm, if it has changed..


Version

1.30

See Also

functions: 

MoveToNewLocation



 author: Charles Feduke, editor: Jasperre, additional contributor(s): Morz, Keith Voss, Lilac Soul