Sending Custom Events to a Script
Sometimes you want to send messages to a script from another script. We provide a simple way of doing so:
Sending Script
Section titled “Sending Script”global OTHER_SCRIPT = nilfunction Start() OTHER_SCRIPT = BoundObjects["OtherGameObject"].GetComponentend
-- See https://developers.abinteractive.net/cck/lua/api/events/#mouse-eventsfunction OnMouseDown() OTHER_SCRIPT.CallReceiverFunction("Click", {Script.Hash})endReceiving Script
Section titled “Receiving Script”function RECEIVE_Click(args) print("Got a click!")end