HPL3/Amnesia: Rebirth/Scripting/Scripting Api/Lamp

From Frictional Wiki
< HPL3‎ | Amnesia: Rebirth‎ | Scripting‎ | Scripting Api
Revision as of 00:04, 16 November 2020 by Abion47 (talk | contribs) (Created page with "{{ScriptingStub}} Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki! ==Summary== {{CodeDocSummaryTop}} {{CodeDocSummaryIte...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

Returns:

  • bool—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) —
  • abActive (bool) —

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) —
  • abLit (bool) —
  • abEffects (bool) —

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) —
  • afMinOnTime (float) —
  • afMaxOnTime (float) —
  • afMinOffTime (float) —
  • afMaxOffTime (float) —
  • abFade (bool) —
  • asOnSound (tString) —
  • asOffSound (tString) —
  • asOnPS (tString) —
  • asOffPS (tString) —

Returns:

  • void