Noodl.Events
This is the Noodl event emitter, you can use it to receive and send events from your scripts. You can learn more about events in the guide.
Noodl.Events.emit(eventName, data)
Send an event. Works well together with Event Receivers.
Noodl.Events.emit("event name", {
value: "hello",
someOtherValue: 100,
});
Noodl.Events.on(eventName, callback(data))
Noodl.Events.once(eventName, callback(data))
Receive an event. Works together with Event Senders
Noodl.Events.on("event name", function (eventData) {
console.log(eventData.value);
});