Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Entities

japan edited this page Mar 9, 2023 · 4 revisions

In Lumina, the entity system differs significantly from that of Source, but the usage is similar. Rather than embedding entities within the map file, entities in Lumina are placed within the scene file. This decision was made due to limitations in the TBLoader plugin we chose to use. Specifically, the plugin did not support point entities in the desired manner, and brush entities were not supported at all.

Entities in Lumina are stored in the /prefabs/ent directory. Each entity should have a billboarded Sprite3D that makes them easy to select and see in the editor. These sprites are not visible to players unless the developer flag is enabled.

Take a look in the sidebar for information about each entity.


Each entity has three generic methods that it can call at any time.

  • kill() - Prints "Bye Bye" and removes the entity.
  • trigger() - Placeholder function that would just print "UNIMPLEMENTED TRIGGER FUNCTION"
  • error(any: msg) - Creates a message on the screen and in the debug with the message and bails out. (internally using kill())
  • msg(any: msg) - Prints a mesage in the debug.

Every frame (using _process()) it checks for the util.developer to make the node with the name dev (case sensitive) visible.