A_SetTranslucent

From ZDoom Wiki
Jump to navigation Jump to search

void A_SetTranslucent (double alpha [, int style])

Note: This function has been superseded by A_SetRenderStyle, which duplicates and extends its functionality. Use of the newer function is advised in order to maintain maximum flexibility in your code.

Usage

Sets translucency for the calling actor.

Parameters

  • alpha: specifies the amount of visibility and is a value between 0.0 (not visible) and 1.0 (fully visible).
  • style: the translucency mode to set:
    • 0: normal translucency blending. This mode combined with an alpha setting of 1.0 will make the actor opaque. This is the default mode.
    • 1: additive blending.
    • 2: fuzz effect. Alpha has no meaning with this setting.

Examples

This rocket variant displays its explosion with additive translucency. Slight visual enhancement.

ACTOR PrettyRocket : Rocket replaces Rocket
{
  States
  {
  Death:
    MISL B 0 A_SetTranslucent(0.75, 1)
    Goto Super::Death
  }
}