SetObjectColor: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Client|1.0}} | {{Info|Function|Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|This creates a new material with a simple color and assigns it to a material slot.}} | ||
{{FuncSyntax|SetObjectColor(object, | {{FuncSyntax|SetObjectColor(object, IntColor [, MaterialSlot])}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|object| | {{FuncParam|object|The object identifier.}} | ||
{{FuncParam| | {{FuncParam|IntColor|Color as an integer from [[RGBA]].}} | ||
{{FuncParamOptional|MaterialSlot| | {{FuncParamOptional|MaterialSlot|To which material slot this color should apply to.}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns '''true''' on success.}} | ||
== Example == | == Example == | ||
Line 18: | Line 16: | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
* [[GetObjectCount]] | |||
* [[GetObjectModelCount]] | |||
* [[GetObjectModelGroup]] | |||
* [[GetObjectModelName]] | |||
* [[GetStreamedObjects]] | |||
* [[GetObjectModel]] | |||
* [[GetObjectLocation]] | |||
* [[GetObjectRotation]] | |||
* [[GetObjectScale]] | |||
* [[GetObjectBoundingBox]] | |||
* [[GetObjectSize]] | |||
* [[EnableObjectHitEvents]] | |||
* [[GetObjectMass]] | |||
* [[SetObjectEditorSpeed]] | |||
* [[SetObjectEditable]] | |||
* [[SetObjectOutline]] | |||
* [[SetObjectCastShadow]] | |||
* [[SetObjectEmissiveColor]] | |||
* [[SetObjectTexture]] | |||
* [[SetObjectAnimatedTexture]] |
Latest revision as of 20:39, 30 August 2020
Description
This creates a new material with a simple color and assigns it to a material slot.
Syntax
SetObjectColor(object, IntColor [, MaterialSlot])
Parameters
- object
The object identifier. - IntColor
Color as an integer from RGBA. - MaterialSlot (optional)
To which material slot this color should apply to.
Return Value
- Returns true on success.
Example
__EDIT_ME__
See also
- GetObjectCount
- GetObjectModelCount
- GetObjectModelGroup
- GetObjectModelName
- GetStreamedObjects
- GetObjectModel
- GetObjectLocation
- GetObjectRotation
- GetObjectScale
- GetObjectBoundingBox
- GetObjectSize
- EnableObjectHitEvents
- GetObjectMass
- SetObjectEditorSpeed
- SetObjectEditable
- SetObjectOutline
- SetObjectCastShadow
- SetObjectEmissiveColor
- SetObjectTexture
- SetObjectAnimatedTexture