TriggerRegisterGameEvent

Parameters
whichTrigger trigger
whichGameEvent gameevent
bug

Registered events cannot be destroyed as an object.

comment

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 menu
TriggerAddAction(trg_gameev, function() print(GetTriggerEventId()) end)
TriggerRegisterGameEvent(trg_gameev, EVENT_GAME_BUILD_SUBMENU)
--> new event on build menu open
patch

1.00

return type
event
Source code
native TriggerRegisterGameEvent takes trigger whichTrigger, gameevent whichGameEvent returns event
Source
common.j
wc3modding.com
TriggerRegisterGameEvent