SetRGBaValue

Category: Arithmetics
Since engine version: 4.9.1.0 GWE

Description

Sets a single color value of a 32 bit color value.
iSelect Selection
0 Alpha value
1 Red value
2 Green value
3 Blue value

Syntax

int SetRGBaValue (int Val, int iNewVal, int iSelect);

Parameters

Val:
32 bit color value
iNewVal:
0-255: Color value to be replaced with the old one.
iSelect:
0-3: Color value to be changed

Example

SetColorDw(SetRGBaValue(GetColorDw(GetCursor()),255,1),GetCursor());
Sets the red value of the current clonk to maximum.
See also: DoRGBaValue, GetRGBaValue
Tyron, August 2004