Difference between revisions of "0107"
(Created page with "thumb|300px|The left bus sign was created using 0107 while the right was created using 029B, both at ground z. {{Icon|trilogy}} '''CREATE_OBJECT''' <hr...") |
(more info) |
||
Line 3: | Line 3: | ||
<hr /> | <hr /> | ||
'''Description''' | '''Description''' | ||
− | : Creates an object at | + | : Creates an object at the point |
'''Syntax''' | '''Syntax''' | ||
: 0107: [''var''] = create_object [''int''] at [''flt1''] [''flt2''] [''flt3''] | : 0107: [''var''] = create_object [''int''] at [''flt1''] [''flt2''] [''flt3''] | ||
Line 18: | Line 18: | ||
:: Z-coordinate (or ''-100.0'' for [[02CE|ground z]]) | :: Z-coordinate (or ''-100.0'' for [[02CE|ground z]]) | ||
− | This opcode creates an object at | + | This opcode creates an object at the point. The z-coordinate uses the bottom 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. |
+ | |||
+ | In GTA III and Vice City, there are two models that exhibit unique behaviors when created: <code>money.dff</code> and <code>package1.dff</code>. 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 == | == Keywords == |
Revision as of 06:36, 1 August 2015
Description
- Creates an object at the point
Syntax
- 0107: [var] = create_object [int] at [flt1] [flt2] [flt3]
Parameter
- [var]
- Variable to store the handle of the object
- [int]
- [flt1]
- X-coordinate
- [flt2]
- Y-coordinate
- [flt3]
- Z-coordinate (or -100.0 for ground z)
This opcode creates an object at the point. The z-coordinate uses the bottom 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