-
Notifications
You must be signed in to change notification settings - Fork 1
Event create
DizzasTeR edited this page Nov 1, 2020
·
1 revision
Creates and registers a custom event/signal that can be triggered and bound to.
bool Event.create(string eventName)
- string eventName - Name the custom event
bool - true if the event was successfully created, false if something went wrong.
local eventCreated = Event.create("myEvent")
if eventCreated then
Event.bind("myEvent", function(...)
Logger.info("myEvent!")
end)
Event.trigger("myEvent")
-- myEvent! is logged
end