HPL3/Amnesia: Rebirth/Scripting/Scripting Api/Light

From Frictional Wiki
Jump to navigation Jump to search

Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!

Summary

Return Type Function and Description
void Light_FadeBrightnessTo(const tString &in asLightName, float afBrightness, float afTime, eEasing aEasing = eEasing_Linear)
Fades the brightness of one or more lights to a specified value
void Light_FadeBrightnessToDefault(const tString &in asLightName, float afTime, eEasing aEasing = eEasing_Linear)
Fades the brightness of one or more lights to a the default value
void Light_FadeTo(const tString &in asLightName, const cColor &in acColor, float afRadius, float afTime)
Fades one or more lights to a specified color and radius
float Light_GetBrightness(const tString &in asLightName)
Gets the brightness of a light
float Light_GetDefaultBrightness(const tString &in asLightName)
Returns the default brightness of a light
void Light_SetBrightness(const tString &in asLightName, float afBrightness)
Sets the brightness of one or more lights
void Light_SetCastShadows(const tString &in asLightName, bool abX)
Sets the casts shadow
void Light_SetCheapGobo(const tString &in asLightName, bool abX)
Sets if a cheaper version of gobo rendering should be used
void Light_SetFlickerActive(const tString &in asLightName, bool abX)
Activates or deactivates the flicker of one or more lights
void Light_SetShadowBiasMul(const tString &in asLightName, float afBias, float afSlopeBias)
Sets the shadow bias for one or more lights
void Light_SetupFlicker(const tString &in asLightName, const cColor &in aOffCol, float afOffRadius, float afOnMinLength, float afOnMaxLength, const tString &in asOnSound, const tString &in asOnPS, float afOffMinLength, float afOffMaxLength, const tString &in asOffSound, const tString &in asOffPS, bool abFade, float afOnFadeMinLength, float afOnFadeMaxLength, float afOffFadeMinLength, float afOffFadeMaxLength)
Set up the flicker of one or more lights
void Light_SetVisible(const tString &in asLightName, bool abVisible)
Sets the visibility of one or more lights

Function Detail

Light_FadeBrightnessTo

void Light_FadeBrightnessTo(const tString &in asLightName,
                            float afBrightness,
                            float afTime,
                            eEasing aEasing = eEasing_Linear)

Fades the brightness of one or more lights to a specified value.

Parameters

  • asLightName (tString) —
  • afBrightness (float) —
  • afTime (float) —
  • aEasing (eEasing) —

Returns:

  • void

Light_FadeBrightnessToDefault

void Light_FadeBrightnessToDefault(const tString &in asLightName,
                                   float afTime,
                                   eEasing aEasing = eEasing_Linear)

Fades the brightness of one or more lights to a the default value.

Parameters

Returns:

  • void

Light_FadeTo

void Light_FadeTo(const tString &in asLightName,
                  const cColor &in acColor,
                  float afRadius,
                  float afTime)

Fades one or more lights to a specified color and radius.

Parameters

  • asLightName (tString) —
  • acColor (cColor) —
  • afRadius (float) —
  • afTime (float) —

Returns:

  • void

Light_GetBrightness

float Light_GetBrightness(const tString &in asLightName)

Gets the brightness of a light

Parameters

Returns:

  • float—float, the brightness of the light

Light_GetDefaultBrightness

float Light_GetDefaultBrightness(const tString &in asLightName)

Returns the default brightness of a light

Parameters

Returns:

  • float

Light_SetBrightness

void Light_SetBrightness(const tString &in asLightName,
                         float afBrightness)

Sets the brightness of one or more lights

Parameters

  • asLightName (tString) —
  • afBrightness (float) —

Returns:

  • void

Light_SetCastShadows

void Light_SetCastShadows(const tString &in asLightName,
                          bool abX)

Sets the casts shadow. Used only by spotlights (for now).

Parameters

  • asLightName (tString) —
  • abX (bool) —

Returns:

  • void

Light_SetCheapGobo

void Light_SetCheapGobo(const tString &in asLightName,
                        bool abX)

Sets if a cheaper version of gobo rendering should be used

Parameters

  • asLightName (tString) —
  • abX (bool) —

Returns:

  • void

Light_SetFlickerActive

void Light_SetFlickerActive(const tString &in asLightName,
                            bool abX)

Activates or deactivates the flicker of one or more lights

Parameters

  • asLightName (tString) —
  • abX (bool) —

Returns:

  • void

Light_SetShadowBiasMul

void Light_SetShadowBiasMul(const tString &in asLightName,
                            float afBias,
                            float afSlopeBias)

Sets the shadow bias for one or more lights

Parameters

  • asLightName (tString) —
  • afBias (float) —
  • afSlopeBias (float) —

Returns:

  • void

Light_SetupFlicker

void Light_SetupFlicker(const tString &in asLightName,
                        const cColor &in aOffCol,
                        float afOffRadius,
                        float afOnMinLength,
                        float afOnMaxLength,
                        const tString &in asOnSound,
                        const tString &in asOnPS,
                        float afOffMinLength,
                        float afOffMaxLength,
                        const tString &in asOffSound,
                        const tString &in asOffPS,
                        bool abFade,
                        float afOnFadeMinLength,
                        float afOnFadeMaxLength,
                        float afOffFadeMinLength,
                        float afOffFadeMaxLength)

Set up the flicker of one or more lights

Parameters

  • asLightName (tString) —
  • aOffCol (cColor) —
  • afOffRadius (float) —
  • afOnMinLength (float) —
  • afOnMaxLength (float) —
  • asOnSound (tString) —
  • asOnPS (tString) —
  • afOffMinLength (float) —
  • afOffMaxLength (float) —
  • asOffSound (tString) —
  • asOffPS (tString) —
  • abFade (bool) —
  • afOnFadeMinLength (float) —
  • afOnFadeMaxLength (float) —
  • afOffFadeMinLength (float) —
  • afOffFadeMaxLength (float) —

Returns:

  • void

Light_SetVisible

void Light_SetVisible(const tString &in asLightName,
                      bool abVisible)

Sets the visibility of one or more lights

Parameters

  • asLightName (tString) —
  • abVisible (bool) —

Returns:

  • void