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|__EDIT_ME__}}
{{FuncDescription|This creates a new material with a simple color and assigns it to a material slot.}}


{{FuncSyntax|SetObjectColor(object, ColorHex [, MaterialSlot, bIsEmissive, EmissiveStrength])}}
{{FuncSyntax|SetObjectColor(object, IntColor [, MaterialSlot])}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|object|__EDIT_ME__}}
{{FuncParam|object|The object identifier.}}
{{FuncParam|ColorHex |__EDIT_ME__}}
{{FuncParam|IntColor|Color as an integer from [[RGBA]].}}
{{FuncParamOptional|MaterialSlot|__EDIT_ME__}}
{{FuncParamOptional|MaterialSlot|To which material slot this color should apply to.}}
{{FuncParamOptional|bIsEmissive|__EDIT_ME__}}
{{FuncParamOptional|EmissiveStrength|__EDIT_ME__}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns '''true''' on success.}}


== Example ==
== Example ==
Line 18: Line 16:


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
* [[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

SetObjectColor

Type: Function
Context: Client
Introduced: v1.0

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