HPL3/SOMA/Scripting/Scripting Api/Tool

From Frictional Wiki
< HPL3‎ | SOMA‎ | Scripting‎ | Scripting Api
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
tString Tool_GetHandAnimationSuffix(const tString &in asName)
Returns the hand animation prefix specified for the tool
void Tool_PickUp(const tString &in asName, bool abEquipTool, bool abCallback)
Adds the specified tool to the player's inventory
void Tool_SetAutoHideAfterPickup(const tString &in asName, bool abX)
Sets if a tool should be hidden automatically after getting picked up and being displayed for a brief moment
void Tool_SetHighlightActive(const tString &in asName, bool abX)
Sets if a tool should have the highlight effect when looked at

Function Detail

Tool_GetHandAnimationSuffix

tString Tool_GetHandAnimationSuffix(const tString &in asName)

Returns the hand animation prefix specified for the tool.

Parameters

  • asName (tString) — the name of the tool entity.

Returns:

  • tString—the tool's hand animation prefix.

Tool_PickUp

void Tool_PickUp(const tString &in asName,
                 bool abEquipTool,
                 bool abCallback)

Adds the specified tool to the player's inventory. Similar to calling the entity interact on the tool entity, but with more control.

Parameters

  • asName (tString) — the name of the tool entity to pickup.
  • abEquipTool (bool) — if the tool should be equipped immediately. If the tool has AutoHide active it will still autohide after a while.
  • abCallback (bool) — if the tool's pickup callback should be executed.

Returns:

  • void

Tool_SetAutoHideAfterPickup

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

Sets if a tool should be hidden automatically after getting picked up and being displayed for a brief moment

Parameters

  • asName (tString) — name of the tool
  • abX (bool) — if it should autohide

Returns:

  • void

Tool_SetHighlightActive

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

Sets if a tool should have the highlight effect when looked at.

Parameters

  • asName (tString) — name of the tool
  • abX (bool) — if it shoudl get highlighted

Returns:

  • void