Difference between revisions of "02CE"

From GTAMods Wiki
Jump to navigation Jump to search
(updating page)
Line 1: Line 1:
{{OpCode
+
{{Icon|trilogy}} '''GET_GROUND_Z_FOR_3D_COORD'''
| ini        = 02CE=4,%4d% %1d% %2d% %3d%
+
<hr />
| description = Gets the height of the ground beneath the coordinate
+
<onlyinclude>{{#ifeq:{{{transcludesection|opcode}}}|opcode|
| p1          = X-coordinate
+
'''Description'''
| p2          = Y-coordinate
+
: Gets the height of the ground beneath the coordinates point
| p3          = Z-coordinate
+
'''Syntax'''
| p4          = Variable to store height of ground
+
: 02CE: [''var''] = ground_z [''flt1''] [''flt2''] [''flt3'']
| game        = GTA3, Vice City, San Andreas
+
'''Parameter'''
| native      = [[GET_GROUND_Z_FOR_3D_COORD]]
+
: [''var'']
}}
+
:: Variable to store the height of the ground as a floating-point value
This opcode can store the height in the Z-axis of the ground below a specific point in the game. If there is no solid ground below that point, the height would be considered as 0. The ground has to have a [[collision model]]. Note that the fourth parameter is placed in the beginning instead of at the end.
+
: [''flt1'']
[[Sanny Builder]] example:<source lang="scm">02CE: 3@ = ground_z_at 0@ 1@ 2@</source>
+
:: X-coordinate
 +
: [''flt2'']
 +
:: Y-coordinate
 +
: [''flt3'']
 +
:: Z-coordinate
 +
'''Native analog'''
 +
: [[GET_GROUND_Z_FOR_3D_COORD]]
  
==Note==
+
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.
The above format is more commonly used. The actual format of this opcode is in order:<br>
+
}}</onlyinclude>
<code>02CE=4,%1d% %2d% %3d% %4d%</code><br>
 
The format to use depends on which INI file you use.
 
  
==Keywords==
+
== Keywords ==
 
get, store, ground, height
 
get, store, ground, height
  
 
[[Category:OpCodes]]
 
[[Category:OpCodes]]

Revision as of 21:10, 10 January 2012

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

[var]
Variable to store the height of the ground as a floating-point value
[flt1]
X-coordinate
[flt2]
Y-coordinate
[flt3]
Z-coordinate

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 beneath the point. If there is no solid ground below the point, the height would be stored as 0.

Keywords

get, store, ground, height