Function; GameEvent_Listen - HWRM/KarosGraveyard GitHub Wiki
GameEvent_Listen(<iEventID>, <sCallback>)
Lets you register a “Game Event”, and associate it with a function defined in GameRule scope.
Note: if you run GameEvent_Listen when there’s already another function associated with the same game event, the old registration will be canceled.
GameEvent_Listen(GE_SalCapStarting,"testFunc")
- <iEventID>: integer, the index of the game event. Any GE_* or NDGE_* constants are valid event index. But even if you use a non valid index (like some large index, 1000 or 2000 or so), the game won’t crash or report a error.
- <sCallback>: string, the name of a callback function. Will only be triggered when the associated event happens.
GameEvent Variable Reference
GBX Forums - Tutorial discussion GameEvent functions how to exchange information between GameRule script and CustomCode scripts
Function Reference
Updated Formatting? Initial
Updated for HWRM? Initial