Difference between revisions of "0400"

From GTAMods Wiki
Jump to navigation Jump to search
(New page: {{OpCode | ini = 0400=7,%5d% %6d% %7d% %1d% %2d% %3d% %4d% | description = Gets the offset of the object's position | p1 = Existing object handle | p2 = Float (X-...)
 
m
Line 3: Line 3:
 
| description = Gets the offset of the object's position
 
| description = Gets the offset of the object's position
 
| p1          = Existing object handle
 
| p1          = Existing object handle
| p2          = Float (X-offset in [[units]])
+
| p2          = Float (X-offset in [[unit]]s)
 
| p3          = Float (Y-offset in units)
 
| p3          = Float (Y-offset in units)
 
| p4          = Float (Z-offset in units)
 
| p4          = Float (Z-offset in units)

Revision as of 17:05, 19 March 2009

{{{games}}}


Description
Gets the offset of the object's position
Syntax
{{{syntax1}}}
Parameter
Native analog
GET_OFFSET_FROM_OBJECT_IN_WORLD_COORDS

If you set the X, Y, and Z offsets to 0.0, it is better to use opcode 01BB instead since you are getting the object's own position. Note that the parameters are mixed around.

Sanny Builder example:

0400: store_coords_to 4@ 5@ 6@ from_object 0@ with_offset 1@ 2@ 3@

Note

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

Keywords

get, store, object, position, location, offset