HPL3/Amnesia: Rebirth/Scripting/Scripting Api/Lever

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
int Lever_GetState(const tString &in asName)
Gets the state of the lever
void Lever_SetAutoMoveEnabled(const tString &in asName, bool abAutoMove)
Enables or disables the auto move property of the lever
void Lever_SetAutoMoveTarget(const tString &in asName, int alTarget)
Sets the auto move target of the lever
void Lever_SetInteractionDisablesStuck(const tString &in asName, bool abX)
Sets if player interaction will disable the stuck state of a lever
void Lever_SetStuckState(const tString &in asName, int alState, bool abEffects)
Sets the stuck state of a lever

Function Detail

Lever_GetState

int Lever_GetState(const tString &in asName)

Gets the state of the lever

Parameters

Returns:

  • int—int, -1 = min, 0 = middle, 1 = max

Lever_SetAutoMoveEnabled

void Lever_SetAutoMoveEnabled(const tString &in asName,
                              bool abAutoMove)

Enables or disables the auto move property of the lever.

Parameters

  • asName (tString) —
  • abAutoMove (bool) —

Returns:

  • void

Lever_SetAutoMoveTarget

void Lever_SetAutoMoveTarget(const tString &in asName,
                             int alTarget)

Sets the auto move target of the lever.

Parameters

  • asName (tString) —
  • alTarget (int) —

Returns:

  • void

Lever_SetInteractionDisablesStuck

void Lever_SetInteractionDisablesStuck(const tString &in asName,
                                       bool abX)

Sets if player interaction will disable the stuck state of a lever.
effect on stuck state.

Parameters

  • asName (tString) —
  • abX (bool) —

Returns:

  • void

Lever_SetStuckState

void Lever_SetStuckState(const tString &in asName,
                         int alState,
                         bool abEffects)

Sets the stuck state of a lever.
the change will not be apparent to the player.

Parameters

  • asName (tString) —
  • alState (int) —
  • abEffects (bool) —

Returns:

  • void