Difference between revisions of "GetHeadingAngle"
Jump to navigation
Jump to search
imported>Vswe m (Added Search Terms) |
imported>Susie |
||
Line 4: | Line 4: | ||
GetHeadingAngle StrangeStatue | GetHeadingAngle StrangeStatue | ||
[http://www.pokerenfrancais.eu/ poker en francais] | |||
Returns the angle between the caller's heading and the ObjectRefID in a range from -180 to 180. | Returns the angle between the caller's heading and the ObjectRefID in a range from -180 to 180. | ||
Revision as of 02:18, 16 July 2010
Syntax:
GetHeadingAngle ObjectRefID
Example:
GetHeadingAngle StrangeStatue
poker en francais Returns the angle between the caller's heading and the ObjectRefID in a range from -180 to 180.
For example, say the player is facing due north. The object StrangeStatue is due west of the player. The command:
player.GetHeadingAngle StrangeStatue
would return -90.
When you add this value to the player's current heading angle, he will face the statue:
set angle to player.getangle z + player.GetHeadingAngle StrangeStatue player.setangle z angle