Skip to main content

Storytellingprop

Overview

This component ensures that entities intended for narrative or environmental storytelling purposes are consistently tagged with "storytellingprop" upon instantiation and ensures the tag is removed when the component is detached. It serves as a lightweight annotation mechanism within the Entity Component System, enabling systems like AI or physics filters to identify and handle such props differently (e.g., ignoring them during pathfinding or interaction logic).

Dependencies & Tags

  • Tag Added: "storytellingprop" on construction.
  • Tag Removed: "storytellingprop" on component removal (via OnRemoveFromEntity).
  • No other components are added or referenced.

Properties

No public properties are explicitly initialized. The component only stores a reference to the owning entity instance (self.inst).

Main Functions

OnRemoveFromEntity()

  • Description: Cleans up by removing the "storytellingprop" tag from the entity when the component is removed, ensuring tag consistency across the entity lifecycle.
  • Parameters: None.

Events & Listeners

None.