CreateObject: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|modelid|The [[Objects|model identifier]] for which object to spawn.}} | {{FuncParam|modelid|The [[Objects|model identifier]] for which object to spawn.}} | ||
{{FuncParam|x| | {{FuncParam|x|X coordinate}} | ||
{{FuncParam|y| | {{FuncParam|y|Y coordinate}} | ||
{{FuncParam|z | | {{FuncParam|z|Z coordinate}} | ||
{{ | {{FuncParamOptional|rx|Roll}} | ||
{{ | {{FuncParamOptional|ry|Pitch}} | ||
{{ | {{FuncParamOptional|rz|Yaw}} | ||
{{ | {{FuncParamOptional|sx|X scale}} | ||
{{ | {{FuncParamOptional|sy|Y scale}} | ||
{{FuncParamOptional|sz| | {{FuncParamOptional|sz|Z scale}} | ||
{{FuncReturnValue|Returns an identifier to the new object. '''false''' on error.}} | {{FuncReturnValue|Returns an identifier to the new object. '''false''' on error.}} |
Revision as of 13:55, 22 March 2019
Description
This function creates an object at a desired location. See Objects for a list of models.
Syntax
CreateObject(modelid, x, y, z [, rx, ry, rz, sx, sy, sz])
Parameters
- modelid
The model identifier for which object to spawn. - x
X coordinate - y
Y coordinate - z
Z coordinate - rx (optional)
Roll - ry (optional)
Pitch - rz (optional)
Yaw - sx (optional)
X scale - sy (optional)
Y scale - sz (optional)
Z scale
Return Value
- Returns an identifier to the new object. false on error.
Example
__EDIT_ME__
See also
- CreateObject
- DestroyObject
- IsValidObject
- GetObjectCount
- GetObjectModel
- IsObjectStreamedIn
- EnableObjectStreamEvents
- SetObjectStreamDistance
- SetObjectLocation
- GetObjectLocation
- SetObjectRotation
- GetObjectRotation
- SetObjectScale
- GetObjectScale
- SetObjectAttached
- SetObjectDetached
- IsObjectAttached
- GetObjectAttachmentInfo
- IsObjectMoving
- SetObjectMoveTo
- StopObjectMove
- SetObjectRotateAxis
- GetObjectModelCount
- GetObjectMass
- GetStreamedObjects
- GetObjectBoundingBox
- GetObjectSize
- EnableObjectHitEvents
- SetObjectEditable
- SetObjectOutline
- SetObjectColor
- SetObjectEmissiveColor
- SetObjectTexture
- SetObjectAnimatedTexture
- SetObjectCastShadow
- SetObjectDimension
- GetObjectActor
- GetAllObjects
- SetObjectModel