Skip to main content

Murderable

Overview

The Murderable component enables an entity to be targeted and killed by certain hostile entities (such as pigs, hounds, and other murderers) by tagging it with "murderable". It ensures the tag is added on instantiation and cleanly removed when the component is detached from the entity.

Dependencies & Tags

  • Component Dependency: None (relies only on core engine functionality).
  • Tags Added: "murderable"
  • Tags Removed (on removal): "murderable"

Properties

PropertyTypeDefault ValueDescription
instEntity(passed to constructor)Reference to the entity the component is attached to.
murdersoundstring?nilUnused placeholder; no sound is assigned or used.

Main Functions

Murderable:OnRemoveFromEntity()

  • Description: Removes the "murderable" tag from the entity when the component is removed, preventing unintended behavior after detachment.
  • Parameters: None.

Events & Listeners

None.