Add on_entity_spawned and on_entity_despawned events

This commit is contained in:
Xertis 2026-04-04 01:53:49 +03:00
parent 936a5c8525
commit 518d5d5ae4
8 changed files with 75 additions and 1 deletions

View file

@ -180,6 +180,10 @@ rig:get_color() -> vec3
rig:set_color(color: vec3)
```
> [!WARNING]
> When an entity moves outside the loaded area, it is removed, triggering the event.
> When it re-enters the loaded area, the entity is spawned again.
## Component events
```lua