Get your own free workspace
View
 

ScreenFlash

Page history last edited by Gamemaster 3 years, 11 months ago

 

ScreenFlash

Usage:

                ScreenFlash(Actor, R, G, B, Alpha, Time, TextureID)

Description:

The ScreenFlash command is used to create a visual effect for a player. It could be used to indicate damage, spell effects, a transition between places, or anything else you can think of. It causes the player's screen to flash a certain colour before fading back to normal.

The Actor parameter should specifiy a player actor, not an NPC. The R, G and B parameters are the flash colour and should each be between 0 and 255. The Alpha parameter controls how transparent the flash is to begin with. An alpha value of 255 is fully opaque, and an alpha value of 0 is fully transparent. The Time parameter is the length of time in milliseconds that the flash should last. A Time value of 1000 will therefore make the flash last for one second before fading out completely. The TextureID parameter allows the flash to take on a certain texture, or you can set it to 65535 to not use a texture.

Example:

                Function Main()
                        // Flash the screen blue for one second
                        ScreenFlash(Actor(), 0, 0, 255, 255, 1000, 65535)
                        Return()
                End Function

Comments (0)

You don't have permission to comment on this page.