SetAlpha - Actor

Member of: Actor Script

Sets this actor's alpha value, optionally fading them to that value rather then popping.

SyntaxEdit

Function SetAlpha(float afTargetAlpha, bool abFade = false) native

ParametersEdit

  • afTargetAlpha: The target alpha value, clamped to the 0 to 1 range. 0 is completely transparent, 1 is completely visible.
  • abFade: If true, the actor will fade over time - otherwise they will pop to the value.
    • Default: False

Return ValueEdit

None.

ExamplesEdit

; Pop the ghost to half-transparent
Ghost.SetAlpha(0.5)


; Fade the ghost to mostly visible
Ghost.SetAlpha(0.9, true)

NotesEdit

The player cannot be faded completely out and will always remain partially visible.

See AlsoEdit