SetUnitVertexColor
- Parameters
-
whichUnit unit
The unit to modify.
red integer
visibility of red channel (clamped to 0-255).
green integer
visibility of green channel (clamped to 0-255).
blue integer
visibility of blue channel (clamped to 0-255).
alpha integer
opacity (clamped to 0-255). A value of 255 is total opacity (fully visible). A value of 0 is total transparency; the model will be invisible, but you'll still see the shadow, HP bar etc.
- comment
Sets the unit's entire model color to the color defined by (red, green, blue, alpha).
The vertex color changes how the model is rendered. For example, setting all r,g,b=0 will make the model entirely black; no colors will be visible (like Illidan's demon form).
To imagine the final result of changing vertex colors, it is helpful to think of individual RGB layers in a color image, if you disable the Red channel, only Green & Blue channels will be shown.
- note
Not to be confused with
SetUnitColor
which changes a unit's player accent color.- return type
nothing
- Source code
native SetUnitVertexColor takes unit whichUnit, integer red, integer green, integer blue, integer alpha returns nothing
- Source
- unit.j
- wc3modding.com
- SetUnitVertexColor