đĄSimObject
General game-object.
Last updated
General game-object.
Last updated
SimObject.Create(model: Hash, coords: Vector3, rotation: Vector3)
: SimObject
Argument | Type | Description |
---|---|---|
Returns SimObject when successfully created.
SimObject.GetHead()
: SimObject
Returns first SimObject in ObjectsTree.
SimObject.GetNext()
: SimObject
Returns next SimObject from ObjectsTree.
SimObject.SetDestroyOnUnload(toggle: boolean)
You can toggle if the current SimObject should be destroyed when script gets unloaded.
When you create any SimObject by default it will be set to be destroyed on unload, but you can override it by calling this function with toggle value to false.
SimObject.Destroy()
Destroys a SimObject. Please note SimObject
will not become null.
SimObject.Restore()
Restores all suspended components.
SimObject.Suspend()
Suspends all components. Note: some certain Objects will need to be suspend each OnGameUpdate.
SimObject.GetName()
: Hash
Returns a SimObject name as hash.
SimObject.GetPropertyName()
: Hash
Returns a SimObject property name as hash, this is basically the model hash you use for creating SimObject.
SimObject:GetType()
: SimObjectType
SimObject.GetPosition()
: Vector3
SimObject.SetPosition(coords: Vector3)
SimObject.GetRotation()
: Vector3
SimObject.SetRotation(euler: Vector3)
SimObject.GetAttachmentCount()
: integer
Returns count of attached SimObjects to current SimObject.
SimObject.GetAttachments()
: array[SimObject]
Returns array of SimObjects that are attached to current SimObject.
Argument | Type | Description |
---|---|---|
Argument | Type | Description |
---|---|---|
Argument | Type | Description |
---|---|---|
model
Hash
-
coords
Vector3
Position of new Object
rotation
Vector3
Rotation of new Object
toggle
boolean
-
coords
Vector3
World coordinates
euler
Vector3
Rotation in euler