Player/ScreenFade

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Changed realm)
Line 1: Line 1:
 
{{Func
 
{{Func
|Description=Fades the screen
+
|Description={{NextUpdate}}
|Realm=Server
+
Fades the screen
 +
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes
 
}}
 
}}

Revision as of 10:13, 8 March 2017

 Player:ScreenFade( )

Contents

Description

Next Update Change

This feature is only available in the next update.

Fades the screen

Arguments

number flags

Fade flags defined with SCREENFADE_ Enums.

Arguments

number clr=color_white

The color of the screenfade

Arguments

number fadeTime

Fade(in/out) effect transition time ( From no fade to full fade and vice versa )

Arguments

number fadeHold

Fade effect hold time

Examples

Example

Flashes the screen red to nothing over 0.3 seconds when a player gets hurt.

hook.Add( "PlayerHurt", "hurt_effect_fade", function( ply )
	ply:ScreenFade( SCREENFADE.IN, Color( 255, 0, 0, 128 ), 0.3, 0 )
end )


Personal tools
Navigation