Difference between revisions of "0107"
m |
|||
Line 5: | Line 5: | ||
| description = Creates an object at the coordinates point | | description = Creates an object at the coordinates point | ||
| syntax1 = 0107: [''var''] = create_object [''int''] at [''flt1''] [''flt2''] [''flt3''] | | syntax1 = 0107: [''var''] = create_object [''int''] at [''flt1''] [''flt2''] [''flt3''] | ||
− | | p1t = ['' | + | | p1t = [''int''] |
− | | p1d | + | | p1d = Model ID number as defined in the [[IDE]] file; also acceptable is model's [[DFF]] name with a hash character |
− | + | | p2t = [''flt1''] | |
− | + | | p2d = X-coordinate | |
− | | | + | | p3t = [''flt2''] |
− | | | + | | p3d = Y-coordinate |
− | | | + | | p4t = [''flt3''] |
− | | | + | | p4d = Z-coordinate (or ≤''-100.0'' for [[02CE|ground z]]) |
− | | | + | | p5t = [''var''] |
− | | | + | | p5d = Variable to store the handle of the object |
}} | }} | ||
Revision as of 23:38, 19 November 2016
- Description
- Creates an object at the coordinates point
- Syntax
- 0107: [var] = create_object [int] at [flt1] [flt2] [flt3]
- Parameter
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
- 029B, creates an object without offset