Registered events cannot be destroyed as an object.
Registers to execute whichTrigger when a game event occurs. Returns a handle to event that represents the registration, you can't do anything with those currently.
trg_gameev = CreateTrigger() -- this will print a message when someone opens a build menu TriggerAddAction(trg_gameev, function() print(GetTriggerEventId()) end) TriggerRegisterGameEvent(trg_gameev, EVENT_GAME_BUILD_SUBMENU) --> new event on build menu open
- return type
- Source code
native TriggerRegisterGameEvent takes trigger whichTrigger, gameevent whichGameEvent returns event