SetObjectColor: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
 
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])}}
{{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.}}


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


== Example ==
== Example ==

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