SetAlpha - Actor
Jump to navigation
Jump to search
Member of: Actor Script
Sets this actor's alpha value, optionally fading them to that value rather then popping.
Syntax[edit | edit source]
Function SetAlpha(float afTargetAlpha, bool abFade = false) native
Parameters[edit | edit source]
- 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 Value[edit | edit source]
None.
Examples[edit | edit source]
; Pop the ghost to half-transparent
Ghost.SetAlpha(0.5)
; Fade the ghost to mostly visible
Ghost.SetAlpha(0.9, true)
Notes[edit | edit source]
The player cannot be faded completely out and will always remain partially visible.