alpha
Controls the transparency of translucent entities or particles. The parameter
gives a percentage. At 0 the entity is totally transparent,
at 100 it is totally intransparent. This way entities
can smoothly be faded in and out.
Range:
0 .. 100 (default: 50)Type:
var
Remarks:
- The TRANSLUCENT flag must
be set.
-
This value is available in shaders through the fAlpha variable.
-
Overlay textures are completely invisible when their alpha value is below the d3d_alpharef threshold
(default: 50%).
Example (lite-C):
// Fade in
set(my,TRANSLUCENT);
for (my.alpha=0; my.alpha+=5*time_step; my.alpha<100) wait(1);
reset(my,TRANSLUCENT);
Example (C-Script):
// Fade in
my.TRANSLUCENT = ON;
my.alpha = 0;
while (my.alpha < 100)
{
my.alpha += 5*time_step;
wait(1);
}
my.TRANSLUCENT = OFF;
See also:
Transparency, TRANSPARENT, BRIGHT, OVERLAY, fAlpha
► latest
version online