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

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:07, 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 SwingDoor_AddDoorBodyImpulse(const tString &in asName, float afImpulseAmount)
bool SwingDoor_GetBlocked(const tString &in asName)
Checks if door is blocked
bool SwingDoor_GetClosed(const tString &in asName)
Checks if door is closed
bool SwingDoor_GetLocked(const tString &in asName)
Checks if door is locked
float SwingDoor_GetOpenAmount(const tString &in asName)
Get open amount of a door
int SwingDoor_GetState(const tString &in asName)
Checks the state of the door
void SwingDoor_SetBlocked(const tString &in asName, bool abBlocked, bool abEffects)
Blocks or unblocks a SwingDoor
void SwingDoor_SetClosed(const tString &in asName, bool abClosed, bool abEffects)
Sets the close state of a SwingDoor
void SwingDoor_SetDisableSnapClose(const tString &in asName, bool abDisableAutoClose)
Disables or enables the automatic close functionality of a door
void SwingDoor_SetLocked(const tString &in asName, bool abLocked, bool abEffects)
Locks or unlocks a SwingDoor
void SwingDoor_SetOpenAmount(const tString &in asName, float afOpenAmount)
Sets the door to a specific open state instantly

Function Detail

SwingDoor_AddDoorBodyImpulse

void SwingDoor_AddDoorBodyImpulse(const tString &in asName,
                                  float afImpulseAmount)


Parameters

  • asName (tString) —
  • afImpulseAmount (float) —

Returns:

  • void

SwingDoor_GetBlocked

bool SwingDoor_GetBlocked(const tString &in asName)

Checks if door is blocked.

Parameters

Returns:

  • bool—bool, true if the door is blocked.

SwingDoor_GetClosed

bool SwingDoor_GetClosed(const tString &in asName)

Checks if door is closed.

Parameters

Returns:

  • bool—bool, true if the door is closed.

SwingDoor_GetLocked

bool SwingDoor_GetLocked(const tString &in asName)

Checks if door is locked.

Parameters

Returns:

  • bool—bool, true if the door is locked.

SwingDoor_GetOpenAmount

float SwingDoor_GetOpenAmount(const tString &in asName)

Get open amount of a door

Parameters

Returns:

  • float—float, open amount of door

SwingDoor_GetState

int SwingDoor_GetState(const tString &in asName)

Checks the state of the door.
0 = inbetween -1 and 1.

Parameters

Returns:

  • int—int, -1 = angle is close to 0, 1 = angle is 70% or higher of max,

SwingDoor_SetBlocked

void SwingDoor_SetBlocked(const tString &in asName,
                          bool abBlocked,
                          bool abEffects)

Blocks or unblocks a SwingDoor. A blocked door can still be opened slightly.
If false, the change will not be apparent to the player.

Parameters

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

Returns:

  • void

SwingDoor_SetClosed

void SwingDoor_SetClosed(const tString &in asName,
                         bool abClosed,
                         bool abEffects)

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

Parameters

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

Returns:

  • void

SwingDoor_SetDisableSnapClose

void SwingDoor_SetDisableSnapClose(const tString &in asName,
                                   bool abDisableAutoClose)

Disables or enables the automatic close functionality of a door.
If enabled, the door will not lose any force pushing it toward its closed position.

Parameters

  • asName (tString) —
  • abDisableAutoClose (bool) —

Returns:

  • void

SwingDoor_SetLocked

void SwingDoor_SetLocked(const tString &in asName,
                         bool abLocked,
                         bool abEffects)

Locks or unlocks a SwingDoor
If false, the change will not be apparent to the player.

Parameters

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

Returns:

  • void

SwingDoor_SetOpenAmount

void SwingDoor_SetOpenAmount(const tString &in asName,
                             float afOpenAmount)

Sets the door to a specific open state instantly.

Parameters

  • asName (tString) —
  • afOpenAmount (float) —

Returns:

  • void