M MY Multiplayer: Wiki
Side
Kind

setEffectColor

Shared

Tints an effect with a colour.

bool setEffectColor(effect effect, float r, float g, float b [, float a = 255])

Parameters

NameTypeDescription
effecteffectThe effect.
rfloatRed, from 0 to 255.
gfloatGreen, from 0 to 255.
bfloatBlue, from 0 to 255.
afloatAlpha, from 0 to 255.default 255

Returns

true if it changed. false with a wrong argument (logs a warning).

Values outside 0 to 255 are clamped and rounded. On the server, the change reaches every client. On a client, changing an effect the server created only holds on this client until the server sends its state again.

Example

local smoke = createEffect("smoke_flare", 2495.1, -1687.4, 13.5)
setEffectColor(smoke, 80, 255, 120)

See also