Difference between revisions of "02CE"

From GTAMods Wiki
Jump to navigation Jump to search
(load collision)
 
Line 1: Line 1:
{{Icon|trilogy}} '''GET_GROUND_Z_FOR_3D_COORD'''
+
{{OpCode
<hr />
+
| games      = {{Icon|t}}
<onlyinclude>{{#ifeq:{{{transcludesection|opcode}}}|opcode|
+
| command    = GET_GROUND_Z_FOR_3D_COORD
'''Description'''
+
| description = Gets the height of the ground beneath the coordinates point
: Gets the height of the ground beneath the coordinates point
+
| syntax1    = 02CE: [''var''] = ground_z [''flt1''] [''flt2''] [''flt3'']
'''Syntax'''
+
| p1t        = [''flt1'']
: 02CE: [''var''] = ground_z [''flt1''] [''flt2''] [''flt3'']
+
| p1d        = X-coordinate
'''Parameter'''
+
| p2t        = [''flt2'']
: [''flt1'']
+
| p2d        = Y-coordinate
:: X-coordinate
+
| p3t        = [''flt3'']
: [''flt2'']
+
| p3d        = Z-coordinate
:: Y-coordinate
+
| p4t        = [''var'']
: [''flt3'']
+
| p4d        = Variable to store the height of the ground, a floating-point value
:: Z-coordinate
+
| native      = [[GET_GROUND_Z_FOR_3D_COORD]]
: [''var'']
+
}}
:: Variable to store the height of the ground as a floating-point value
 
'''Native analog'''
 
: [[GET_GROUND_Z_FOR_3D_COORD]]
 
  
This opcode can store the height in the Z-axis of the ground below the specific coordinates point. There can only be a ground if there is a [[Collision File|collision]] beneath the point. If there is no solid ground below the point, the height would be stored as 0.
+
This opcode gets the height in the z-axis of the ground below the specified coordinates point. There is a ground if there is a [[Collision File|collision]] loaded beneath the point. If there is no solid ground below the point, the height would return ''0.0''. For Vice City and San Andreas, if you want to guarantee that the collision at the point is loaded, use opcode [[04E4]] followed by [[038B]] to force the loading of the collision and then immediately retrieve the ground z.
}}</onlyinclude>
 
  
 
== Keywords ==
 
== Keywords ==
 
get, store, ground, height
 
get, store, ground, height
 
[[Category:OpCodes]]
 

Latest revision as of 04:35, 25 November 2016

GTA III Vice City San Andreas GET_GROUND_Z_FOR_3D_COORD


Description
Gets the height of the ground beneath the coordinates point
Syntax
02CE: [var] = ground_z [flt1] [flt2] [flt3]
Parameter
[flt1]
X-coordinate
[flt2]
Y-coordinate
[flt3]
Z-coordinate
[var]
Variable to store the height of the ground, a floating-point value
Native analog
GET_GROUND_Z_FOR_3D_COORD

This opcode gets the height in the z-axis of the ground below the specified coordinates point. There is a ground if there is a collision loaded beneath the point. If there is no solid ground below the point, the height would return 0.0. For Vice City and San Andreas, if you want to guarantee that the collision at the point is loaded, use opcode 04E4 followed by 038B to force the loading of the collision and then immediately retrieve the ground z.

Keywords

get, store, ground, height