HPL3/SOMA/Scripting/Scripting Api/Lamp

From Frictional Wiki
< HPL3‎ | SOMA‎ | Scripting‎ | Scripting Api
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
bool Lamp_GetLit(const tString &in asName)
Gets the lit state of a lamp
void Lamp_SetFlickerActive(const tString &in asName, bool abActive)
Activates or deactivates flicker on the specified lamp(s)
void Lamp_SetLit(const tString &in asName, bool abLit, bool abEffects)
Sets the lit state of a lamp
void Lamp_SetupFlicker(const tString &in asName, float afMinOnTime, float afMaxOnTime, float afMinOffTime, float afMaxOffTime, bool abFade = false, const tString &in asOnSound = "", const tString &in asOffSound = "", const tString &in asOnPS = "", const tString &in asOffPS = "")
Sets the properties of the flicker of a lamp

Function Detail

Lamp_GetLit

bool Lamp_GetLit(const tString &in asName)

Gets the lit state of a lamp.

Parameters

  • asName (tString) — name of the lamp.

Returns:

  • bool—if the lamp is lit.

Lamp_SetFlickerActive

void Lamp_SetFlickerActive(const tString &in asName,
                           bool abActive)

Activates or deactivates flicker on the specified lamp(s)

Parameters

  • asName (tString) — name of the lamp, wildcards (*) supported.
  • abActive (bool) — flicker state to set.

Returns:

  • void

Lamp_SetLit

void Lamp_SetLit(const tString &in asName,
                 bool abLit,
                 bool abEffects)

Sets the lit state of a lamp.
If false, the change will not be apparent to the player.

Parameters

  • asName (tString) — name of the lamp.
  • abLit (bool) — lit state to set.
  • abEffects (bool) — if the change should activate effects associated with it.

Returns:

  • void

Lamp_SetupFlicker

void Lamp_SetupFlicker(const tString &in asName,
                       float afMinOnTime,
                       float afMaxOnTime,
                       float afMinOffTime,
                       float afMaxOffTime,
                       bool abFade = false,
                       const tString &in asOnSound = "",
                       const tString &in asOffSound = "",
                       const tString &in asOnPS = "",
                       const tString &in asOffPS = "")

Sets the properties of the flicker of a lamp.
with setting the lit state of the lamp. Default = false.

Parameters

  • asName (tString) — name of the lamp, wildcards (*) supported.
  • afMinOnTime (float) — The minimum time the lamp will be turned on when flickering.
  • afMaxOnTime (float) — The maximum time the lamp will be turned on when flickering.
  • afMinOffTime (float) — The minimum time the lamp will be turned off when flickering.
  • afMaxOffTime (float) — The maximum time the lamp will be turned off when flickering.
  • abFade (bool) — if the lamp should fade on or off, and use any effects associated
  • asOnSound (tString) — sound to play when turned on. Default = .
  • asOffSound (tString) — sound to play when turned off. Default = .
  • asOnPS (tString) — particle system to create when turned on. Default = .
  • asOffPS (tString) — sparticle system to create when turned off. Default = .

Returns:

  • void