Skip to content

Tool

Inherits PhysicalModel

Tools are objects that can be held by the player.

Properties

Droppable : boolean

Determines whether the tool can be dropped by the player.

IconImage : ImageAsset

The icon for this tool, appears in inventory.

Holder : NPC

Determines who is currently holding this tool.

Methods

Activate → nil

Parameters: ``

Activates the tool, similarly to pressing the mouse button.

Deactivate → nil

Parameters: ``

Deactivates the tool, similarly to releasing the mouse button.

PlayAnimation → nil

Parameters: animationName [ string ]

Plays the specified animation on the holder of the tool.

Events

Equipped

Parameters: ``

Fires when this tool has been equipped

Unequipped

Parameters: ``

Fires when this tool has been unequipped

Activated

Parameters: ``

Fires when this tool has been activated (via mouse press or Tool:Activate)

Deactivated

Parameters: ``

Fires when this tool has been deactivated (via mouse release or Tool:Deactivate)