-
Notifications
You must be signed in to change notification settings - Fork 1
Event trigger
DizzasTeR edited this page Nov 1, 2020
·
2 revisions
Triggers an event, custom or not.
bool Event.trigger(string eventName [, ...optionalArguments])- string eventName - The event to trigger
bool - true if the event was successfully triggered, false if something went wrong.
Event.create("myEvent")
Event.bind("myEvent", function(...)
Logger.info("myEvent!")
end)
Event.bind("onServerInit", function()
Event.trigger("myEvent") -- trigger my custom event
end)