1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-29 03:33:48 +00:00

Updated entity scripting (markdown)

False.Genesis 2019-09-01 22:44:21 +02:00
parent e77e644456
commit 52193ea0c7

@ -84,7 +84,7 @@ If the function returns false, damage is not applied.
Called when a message is received (sent via `entity_msg(me, message, value)`. This function is substantially different in OSE and previous versions: Called when a message is received (sent via `entity_msg(me, message, value)`. This function is substantially different in OSE and previous versions:
* Pre-OSE: Message is a string, value may can be a number, entity, or node. Due to how entity pointers are encoded in this version, value will always be a number, so message sender and receiver need to agree on how to interpret value, otherwise it'll crash. Communication is unidirectional only, i.e. if you want to answer, you'll have to send a message back. * Pre-OSE: Message is a string, value may can be a number, entity, or node. Due to how entity pointers are encoded in this version, value will always be a number, so message sender and receiver need to agree on how to interpret value, otherwise it'll crash. Communication is unidirectional only, i.e. if you want to answer, you'll have to send a message back.
* OSE: Message handling is variadic, i.e. `msg(me, ...)` receives all parameters from the corresponding `entity_msg(me, ...) call. Values returned from `msg()` are forwarded to and returned by `entity_msg()`. This allows for easy bi-directional communication. * OSE: Message handling is variadic, i.e. `msg(me, ...)` receives all parameters from the corresponding `entity_msg(me, ...)` call. Values returned from `msg()` are forwarded to and returned by `entity_msg()`. This allows for easy bi-directional communication.
## Special interface functions ## Special interface functions