mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 09:44:02 +00:00
Updated entities (markdown)
parent
b40ea8d7d7
commit
0f3936085b
1 changed files with 11 additions and 0 deletions
11
entities.md
11
entities.md
|
@ -29,3 +29,14 @@ They can still be controlled by scripts though.
|
|||
|
||||
Li, on the other hand, is completely script controlled, but receives a lot of special handling in the game's code. The Li entity, if Li is enabled, is actually spawned before the map file is even loaded. So if you have any super-special code that must run before anything else on map load, put it inside _li.lua_'s `init()` function, and stick `setFlag(1000, 100)` into your [[mod-init.lua|other-scripts#mod-initlua]]'s `init()` function to enable Li from the very beginning.
|
||||
|
||||
# Entity death
|
||||
|
||||
On death, an entity usually plays a sound effect and leaves a small puff of particles. Optionally, an entity may drop ingredients or a ManaBall. All of this can be controlled by [[scripting|entity-scripting]].
|
||||
|
||||
The defeat of special entities like bosses shall not be rushed. For this purpose, a _death scene_ can be enabled that will delay an entity's death by some time while a script runs, e.g. a cutscene.
|
||||
|
||||
Once an entity is dead it will despawn. There is no way to revive a dead entity.
|
||||
|
||||
Some special entities (e.g. Naija, Li) must not be killed:
|
||||
* In case Naija despawns, the game will crash immediately. This is normally not possible but a wrong `entity_delete()` can still accidentally delete Naija and cause a crash.
|
||||
* In case Li despawns without proper cleanup (`setLi(0)`), the game will crash next time it tries to do anything with Li.
|
Loading…
Reference in a new issue