Difference between revisions of "0172"

From GTAMods Wiki
Jump to navigation Jump to search
(New page: {{OpCode | ini = 0172=2,%2d% %1d% | description = Gets the Z angle of the character | p1 = Actor handle | p2 = Variable to store the angle | game = GTA...)
 
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{OpCode
 
{{OpCode
| ini        = 0172=2,%2d% %1d%
+
| games      = {{Icon|t}}
| description = Gets the Z [[angle]] of the character
+
| command    = GET_CHAR_HEADING
| p1          = Actor handle
+
| description = Gets the [[heading]] of the character
| p2          = Variable to store the angle
+
| syntax1    = 0172: [''var''] = actor [''char handle''] z_angle
| game        = GTA3, Vice City, San Andreas
+
| p1t        = [''char handle'']
 +
| p1d        = The handle of the character
 +
| p2t        = [''var'']
 +
| p2d        = Variable to store the heading, a floating-point value
 
| native      = [[GET_CHAR_HEADING]]
 
| native      = [[GET_CHAR_HEADING]]
 
}}
 
}}
This gets the Z angle of the character and stores it into a variable. The angle is in degrees. Note that the parameters are swapped.
 
[[Sanny Builder]] example:<source lang="scm">0172: 1@ = actor 0@ Z_angle</source>
 
  
==Note==
+
This opcode gets the heading (z angle) of the character.
The above format is more commonly used. The actual format of this opcode is in order:<br>
 
<code>0172=2,%1d% %2d%</code><br>
 
The format to use depends on which INI file you use.
 
  
==Keywords==
+
{{direction|deg}}
get, store, actor, character, angle
+
 
 +
== Keywords ==
 +
get, store, actor, character, angle, heading
 +
 
 +
== See also ==
 +
* {{Icon|3}} {{Icon|VC}} [[0170]], gets the heading of the player
 +
* {{Icon|t}} [[0173]], sets the heading of the character

Latest revision as of 00:13, 20 November 2016

GTA III Vice City San Andreas GET_CHAR_HEADING


Description
Gets the heading of the character
Syntax
0172: [var] = actor [char handle] z_angle
Parameter
[char handle]
The handle of the character
[var]
Variable to store the heading, a floating-point value
Native analog
GET_CHAR_HEADING

This opcode gets the heading (z angle) of the character.

Compass Degrees
North
West 90°
South 180°
East 270°

Keywords

get, store, actor, character, angle, heading

See also

  • GTA III Vice City 0170, gets the heading of the player
  • GTA III Vice City San Andreas 0173, sets the heading of the character