This commit is contained in:
Aria 2025-03-21 22:23:30 +11:00
commit 9c94d113d3
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10260 changed files with 1237388 additions and 0 deletions

21
doc/lua/message.md Normal file
View file

@ -0,0 +1,21 @@
The message table contains a single function, setHandler, which allows entities to receive messages sent using world.sendEntityMessage. Entities which can receive messages include:
* monster
* NPC
* object
* vehicle
* stagehand
* projectile
Additionally, messages can be handled by a variety of script contexts that run on the player:
* activeitem
* quest
* playercompanions
* status
---
#### `void` message.setHandler(`String` messageName, `LuaFunction` handler)
Messages of the specified message type received by this script context will call the specified function. The first two arguments passed to the handler function will be the `String` messageName and a `bool` indicating whether the message is from a local entity, followed by any arguments sent with the message.