Skip to main content

Wax

Overview

This component tracks and controls whether an entity behaves as a wax spray. It maintains an is_spray state and ensures the entity's "waxspray" tag is correctly added or removed based on that state.

Dependencies & Tags

  • Tags used:
    • Adds "waxspray" tag when is_spray is true.
    • Removes "waxspray" tag when is_spray is false.
  • No external component dependencies are explicitly declared or inferred.

Properties

PropertyTypeDefault ValueDescription
is_spraybooleanfalseIndicates whether the entity is currently acting as a wax spray.

Main Functions

Wax:SetIsSpray()

  • Description: Sets the is_spray state to true, which triggers addition of the "waxspray" tag to the entity.
  • Parameters: None.

Wax:GetIsSpray()

  • Description: Returns the current value of the is_spray flag.
  • Parameters: None.

OnIsSprayFn(self, is_spray)

  • Description: Internal callback used when is_spray is set (via metatable assignment); updates the entity's "waxspray" tag accordingly.
  • Parameters:
    • self: The Wax component instance.
    • is_spray: Boolean indicating the desired spray state.

Events & Listeners

None.