HPL3/SOMA/Scripting/Scripting Api/Lever

From Frictional Wiki
< HPL3‎ | SOMA‎ | Scripting‎ | Scripting Api
Revision as of 21:55, 24 August 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
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

  • asName (tString) — name of lever.

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) — name of lever.
  • abAutoMove (bool) — if true, auto move will be enabled.

Returns:

  • void

Lever_SetAutoMoveTarget

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

Sets the auto move target of the lever.

Parameters

  • asName (tString) — name of lever.
  • alTarget (int) — -1 = min, 0 = middle, 1 = max

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) — name of lever.
  • abX (bool) — true = interaction disables stuck state - false = interaction has no

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) — name of lever.
  • alState (int) — stuck state where -1 = stuck at min, 1 = stuck at max and 0 = not stuck.
  • abEffects (bool) — if the change should activate effects associated with it. If false,

Returns:

  • void