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.
Example (Lua):
trg_gameev = CreateTrigger()-- this will print a message when someone opens a build menuTriggerAddAction(trg_gameev, function() print(GetTriggerEventId()) end)TriggerRegisterGameEvent(trg_gameev, EVENT_GAME_BUILD_SUBMENU)--> new event on build menu open Copy
trg_gameev = CreateTrigger()-- this will print a message when someone opens a build menuTriggerAddAction(trg_gameev, function() print(GetTriggerEventId()) end)TriggerRegisterGameEvent(trg_gameev, EVENT_GAME_BUILD_SUBMENU)--> new event on build menu open
Registered events cannot be destroyed as an object.
Generated using TypeDoc
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.
Example (Lua):