Difference between revisions of "HPL3/Amnesia: Rebirth/Scripting/Scripting Api/MovingButton"

From Frictional Wiki
Jump to navigation Jump to search
(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...")
 
(No difference)

Latest revision as of 01:06, 16 November 2020

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 MovingButton_Blink(const tString &in asName)
Makes the MovingButton blink in accordance to how it is set up in the ent file
float MovingButton_GetStateAmount(const tString &in asName)
Returns the current state of the MovingButton
bool MovingButton_IsDisabled(const tString &in asName)
Checks if the MovingButton is disabled (will not light up or respond to presses)
bool MovingButton_IsLocked(const tString &in asName)
Checks if the MovingButton is locked
bool MovingButton_IsSwitchedOn(const tString &in asName)
Returns the state of the button, on/off
void MovingButton_SetCanBeSwitchedOff(const tString &in asName, bool abState)
Sets if the moving button can be switched off by the player or not
void MovingButton_SetCanBeSwitchedOn(const tString &in asName, bool abState)
Sets if the moving button can be switched on by the player or not
void MovingButton_SetDisabled(const tString &in asName, bool abState, bool abUseEffects = true)
Sets the MovingButtons disabled state
void MovingButton_SetLocked(const tString &in asName, bool abState, bool abUseEffects = true)
Sets the MovingButtons locked state
void MovingButton_SetReturnToOffTime(const tString &in asName, float afTime)
Sets the time it should take for the button to return to its off state
void MovingButton_SetSwitchedOn(const tString &in asName, bool abState, bool abEffects)
Switches a button on/off

Function Detail

MovingButton_Blink

void MovingButton_Blink(const tString &in asName)

Makes the MovingButton blink in accordance to how it is set up in the ent file.

Parameters

Returns:

  • void

MovingButton_GetStateAmount

float MovingButton_GetStateAmount(const tString &in asName)

Returns the current state of the MovingButton

Parameters

Returns:

  • float

MovingButton_IsDisabled

bool MovingButton_IsDisabled(const tString &in asName)

Checks if the MovingButton is disabled (will not light up or respond to presses).

Parameters

Returns:

  • bool—bool, true = disabled, false = enabled.

MovingButton_IsLocked

bool MovingButton_IsLocked(const tString &in asName)

Checks if the MovingButton is locked.

Parameters

Returns:

  • bool—bool, true = locked, false = unlocked.

MovingButton_IsSwitchedOn

bool MovingButton_IsSwitchedOn(const tString &in asName)

Returns the state of the button, on/off.

Parameters

Returns:

  • bool—bool, true = on - false = off.

MovingButton_SetCanBeSwitchedOff

void MovingButton_SetCanBeSwitchedOff(const tString &in asName,
                                      bool abState)

Sets if the moving button can be switched off by the player or not

Parameters

  • asName (tString) —
  • abState (bool) —

Returns:

  • void

MovingButton_SetCanBeSwitchedOn

void MovingButton_SetCanBeSwitchedOn(const tString &in asName,
                                     bool abState)

Sets if the moving button can be switched on by the player or not

Parameters

  • asName (tString) —
  • abState (bool) —

Returns:

  • void

MovingButton_SetDisabled

void MovingButton_SetDisabled(const tString &in asName,
                              bool abState,
                              bool abUseEffects = true)

Sets the MovingButtons disabled state

Parameters

  • asName (tString) —
  • abState (bool) —
  • abUseEffects (bool) —

Returns:

  • void

MovingButton_SetLocked

void MovingButton_SetLocked(const tString &in asName,
                            bool abState,
                            bool abUseEffects = true)

Sets the MovingButtons locked state

Parameters

  • asName (tString) —
  • abState (bool) —
  • abUseEffects (bool) —

Returns:

  • void

MovingButton_SetReturnToOffTime

void MovingButton_SetReturnToOffTime(const tString &in asName,
                                     float afTime)

Sets the time it should take for the button to return to its off state.

Parameters

  • asName (tString) —
  • afTime (float) —

Returns:

  • voidafTime, time to return to off state.

MovingButton_SetSwitchedOn

void MovingButton_SetSwitchedOn(const tString &in asName,
                                bool abState,
                                bool abEffects)

Switches a button on/off.
the change will not be apparent to the player.

Parameters

  • asName (tString) —
  • abState (bool) —
  • abEffects (bool) —

Returns:

  • void