• 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.

    Parameters

    • whichUnit: Unit<UnitEventMap>

      The unit to modify.

    • red: number

      visibility of red channel (clamped to 0-255).

    • green: number

      visibility of green channel (clamped to 0-255).

    • blue: number

      visibility of blue channel (clamped to 0-255).

    • alpha: number

      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.

    Returns void

    Note

    Not to be confused with SetUnitColor which changes a unit's player accent color.

Generated using TypeDoc