Difference between revisions of "02CE"

From GTAMods Wiki
Jump to navigation Jump to search
Line 1: Line 1:
<code>02CE=4,%1d% %2d% %3d% %4d%</code><br>
+
{{OpCode
'''Description''': Gets the height of the ground below the point<br>
+
| ini        = 02CE=4,%4d% %1d% %2d% %3d%
'''Parameter 1''': X-coordinate<br>
+
| description = Gets the height of the ground beneath the coordinate
'''Parameter 2''': Y-coordinate<br>
+
| p1          = X-coordinate
'''Parameter 3''': Z-coordinate<br>
+
| p2          = Y-coordinate
'''Parameter 4''': Variable to store height of ground<br>
+
| p3          = Z-coordinate
'''Supports''': GTA3, Vice City, San Andreas<br>
+
| p4          = Variable to store height of ground
 
+
| game        = GTA3, Vice City, San Andreas
This opcode can store the height 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.
+
| native      = [[GET_GROUND_Z_FOR_3D_COORD]]
 +
}}
 +
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.
 +
[[Sanny Builder]] example:<source lang="scm">02CE: 3@ = ground_z_at 0@ 1@ 2@</source>
  
 
==Note==
 
==Note==
Sometimes this opcode is written as this:<br>
+
The above format is more commonly used. The actual format of this opcode is in order:<br>
<code>02CE=4,%4d% %1d% %2d% %3d%</code><br>
+
<code>02CE=4,%1d% %2d% %3d% %4d%</code><br>
The fourth parameter is placed in the beginning instead of at the end. This depends on which sascm.ini file you use.<br>
+
The format to use depends on which INI file you use.
[[Mission_Scripting_%28Overview%29#Sanny_Builder|Sanny Builder]] by default:
 
<code>02CE: 16@ = ground_z_at 2@ 3@ 4@</code>
 
  
 
==Keywords==
 
==Keywords==

Revision as of 18:24, 28 December 2008

{{{games}}}


Description
Gets the height of the ground beneath the coordinate
Syntax
{{{syntax1}}}
Parameter
Native analog
GET_GROUND_Z_FOR_3D_COORD

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.

Sanny Builder example:

02CE: 3@ = ground_z_at 0@ 1@ 2@

Note

The above format is more commonly used. The actual format of this opcode is in order:
02CE=4,%1d% %2d% %3d% %4d%
The format to use depends on which INI file you use.

Keywords

get, store, ground, height