Difference between revisions of "0107"

From GTAMods Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
 
[[File:0107 029B.jpg|thumb|300px|The left bus sign was created using 0107 while the right was created using 029B, both at ground z.]]
 
[[File:0107 029B.jpg|thumb|300px|The left bus sign was created using 0107 while the right was created using 029B, both at ground z.]]
{{Icon|trilogy}} '''CREATE_<wbr>OBJECT'''
+
{{OpCode
<hr />
+
| games      = {{Icon|t}}
'''Description'''
+
| command    = CREATE_<wbr>OBJECT
: Creates an object at the coordinates point
+
| description = Creates an object at the coordinates point
'''Syntax'''
+
| syntax1    = 0107: [''var''] = create_object [''int''] at [''flt1''] [''flt2''] [''flt3'']
: 0107: [''var''] = create_object [''int''] at [''flt1''] [''flt2''] [''flt3'']
+
| p1t        = [''var'']
'''Parameter'''
+
| p1d        = Variable to store the handle of the object
: [''var'']
+
| p2t        = [''int'']
:: Variable to store the handle of the object
+
| p2d        = Model ID number as defined in the [[IDE]] file; also acceptable is model's [[DFF]] name with a hash character
: [''int'']
+
| p3t        = [''flt1'']
:: Model ID number as defined in the [[IDE]] file; also acceptable is model's [[DFF]] name with a hash character
+
| p3d        = X-coordinate
: [''flt1'']
+
| p4t        = [''flt2'']
:: X-coordinate
+
| p4d        = Y-coordinate
: [''flt2'']
+
| p5t        = [''flt3'']
:: Y-coordinate
+
| p5d        = Z-coordinate (or &le;''-100.0'' for [[02CE|ground z]])
: [''flt3'']
+
}}
:: Z-coordinate (or ''-100.0'' for [[02CE|ground z]])
 
  
 
This opcode creates an object at the coordinates point. The z-coordinate uses the base rather than the center of the object's bounding box. Use opcode [[029B]] to create an object without this offset. It is not required to load the model (like through opcode [[0247]]) to create the object. The object must already have an entry in the <code>[[object.dat]]</code> file in order for them to be stable. Without an entry, the object can become unstable and when that happens the game will crash.
 
This opcode creates an object at the coordinates point. The z-coordinate uses the base rather than the center of the object's bounding box. Use opcode [[029B]] to create an object without this offset. It is not required to load the model (like through opcode [[0247]]) to create the object. The object must already have an entry in the <code>[[object.dat]]</code> file in order for them to be stable. Without an entry, the object can become unstable and when that happens the game will crash.
Line 27: Line 26:
 
== See also ==
 
== See also ==
 
* {{Icon|t}} [[029B]], creates an object without offset
 
* {{Icon|t}} [[029B]], creates an object without offset
 
[[Category:OpCodes]]
 

Revision as of 02:15, 11 February 2016

The left bus sign was created using 0107 while the right was created using 029B, both at ground z.

GTA III Vice City San Andreas CREATE_OBJECT


Description
Creates an object at the coordinates point
Syntax
0107: [var] = create_object [int] at [flt1] [flt2] [flt3]
Parameter
[var]
Variable to store the handle of the object
[int]
Model ID number as defined in the IDE file; also acceptable is model's DFF name with a hash character
[flt1]
X-coordinate
[flt2]
Y-coordinate
[flt3]
Z-coordinate (or ≤-100.0 for ground z)

This opcode creates an object at the coordinates point. The z-coordinate uses the base rather than the center of the object's bounding box. Use opcode 029B to create an object without this offset. It is not required to load the model (like through opcode 0247) to create the object. The object must already have an entry in the object.dat file in order for them to be stable. Without an entry, the object can become unstable and when that happens the game will crash.

In GTA III and Vice City, there are two models that exhibit unique behaviors when created: money.dff and package1.dff. They will appear just like a regular pickup (rotating, glowing coronas, and emitting light) but they can't be picked up and they have collision.

Keywords

create, spawn, object, model

See also

  • GTA III Vice City San Andreas 029B, creates an object without offset