GHI_ScreenFlash

Pilus edited this page Aug 11, 2015 · 1 revision

Syntax:

GHI_ScreenFlash(fadeIn, fadeOut, duration, color)

As of GHI 2.0.12 The following will be available.

GHI_ScreenFlash(fadeIn, fadeOut, duration, color, alpha, texture, blend, repeating)

Arguments:

GHI_ has 4 required arguments and 4 optional arguments as of GHI 2.0.12

fadeIn
''Number''
The time in seconds that the color takes to fade in.
fadeOut
''Number''
The time in seconds that the color takes to fade out.
duration
''Number''
The total time of the action, including fade in and fade out time.
color
''Table or String''
This argument colors the screen flash. If a texture is provided, it will tint the color of the image to this color. if no tint is desired, make this value nil. Takes an color table of RGB Values ranging from 0 to 1, or a color from the following list. (RGB value listed for reference):
  • red = { r = 1, g = 0.0, b = 0.0 },
  • white = { r = 1, g = 1, b = 1 },
  • yellow = { r = 1, g = 1, b = 0.0 },
  • gold = { r = 0.5, g = 0.5, b = 0.0 },
  • green = { r = 0.0, g = 1, b = 0.0 },
  • green2 = { r = 0.0, g = 0.5, b = 0.0 },
  • blue = { r = 0.0, g = 0.0, b = 1 },
  • blue2 = { r = 0.0, g = 0.0, b = 0.5 },
  • purple = { r = 0.5, g = 0.0, b = 0.5 },
  • teal = { r = 0.0, g = 0.5, b = 0.5 },
  • orange = { r = 0.8, g = 0.4, b = 0.0 },
  • Lgreen = { r = 0.4, g = 0.8, b = 0.0 },
  • Lblue = { r = 0.0, g = 0.4, b = 0.8 },
  • Dgreen = { r = 0.0, g = 0.8, b = 0.4 },
  • Pink = { r = 0.8, g = 0.0, b = 0.4 },
  • Dblue = { r = 0.4, g = 0.0, b = 0.8 },
  • brown = { r = 0.5, g = 0.0, b = 0.0 },
  • gray = { r = 0.5, g = 0.5, b = 0.5 },
  • black = { r = 0, g = 0, b = 0 },
alpha
''Number''
Number between 0 (fully transparent) and 1 (fully opaque) that is the transparency of the screen flash.
texture
''String''
A path to the image you wish to use for the screen flash. Mark nil for no texture.
blend
''String''
Mark nil for default blending. (ADD for textures, DISABLE for pure color)
  • ''ADD'' --Add the colors of the screen effect to the current view, uses alpha channels for transparency.
  • ''BLEND'' -- blend using alpha channels.
  • ''MOD'' -- Multiplies colors by the screen values, ignores alpha channels.
  • ''ALPHAKEY'' -- Uses black and white information to determine transparency. The closer to white, the more opaque.
  • ''DISABLE'' -- Disables any blending, the texture or color will be fully opaque. Ignores alpha channels.
repeating
''Number''
The number of times to repeat the flash. If nil it will only flash once.

Aliases:

None

Example:

GHI_ScreenFlash(1, 1, 2,{ r = 0.8, g = 0.0, b = 0.4 })

This script causes the screen to flash pink.

GHI_ScreenFlash(1, 1, 2,"teal")

This script causes the screen to flash teal.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.