Difference between revisions of "0176"

From GTAMods Wiki
Jump to navigation Jump to search
(New page: {{OpCode | ini = 0176=2,%2d% %1d% | description = Gets the Z angle of the object | p1 = Existing object handle | p2 = Variable to store the angle | game ...)
 
(page updates)
Line 1: Line 1:
 
{{OpCode
 
{{OpCode
| ini        = 0176=2,%2d% %1d%
+
| games      = {{Icon|t}}
| description = Gets the Z [[angle]] of the object
+
| command    = GET_OBJECT_HEADING
| p1          = Existing object handle
+
| description = Gets the [[heading]] of the object
| p2          = Variable to store the angle
+
| syntax1    = 0176: [''var''] = object [''object handle''] z_angle
| game        = GTA3, Vice City, San Andreas
+
| p1t        = [''var'']
 +
| p1d        = Variable to store the heading
 +
| p2t        = [''object handle'']
 +
| p2d        = The handle of the object
 
| native      = [[GET_OBJECT_HEADING]]
 
| native      = [[GET_OBJECT_HEADING]]
 
}}
 
}}
Note that the parameters are swapped.
 
[[Sanny Builder]] example:<source lang="scm">0176: 1@ = object 0@ Z_angle</source>
 
  
==Note==
+
This opcode gets the heading (z angle) of the object.
The above format is more commonly used. The actual format of this opcode is in order:<br>
 
<code>0176=2,%1d% %2d%</code><br>
 
The format to use depends on which INI file you use.
 
  
==Keywords==
+
{{direction|deg=1}}
get, store, object, angle
+
 
 +
== Keywords ==
 +
get, store, object, angle, heading
 +
 
 +
== See also ==
 +
* {{Icon|t}} [[0177]], sets the heading of the object

Revision as of 19:32, 19 June 2016

GTA III Vice City San Andreas GET_OBJECT_HEADING


Description
Gets the heading of the object
Syntax
0176: [var] = object [object handle] z_angle
Parameter
[var]
Variable to store the heading
[object handle]
The handle of the object
Native analog
GET_OBJECT_HEADING

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

Compass Degrees Radians
North 0
West 90° π/2 ≈ 1.57
South 180° π ≈ 3.14
East 270° 3π/2 ≈ 4.71

Keywords

get, store, object, angle, heading

See also

  • GTA III Vice City San Andreas 0177, sets the heading of the object