Dota 2 Workshop Tools/Scripting/API/Global.ListenToGameEvent
< Dota 2 Workshop Tools | Scripting | API
Jump to navigation
Jump to search
Function Description
int ListenToGameEvent(string EventName, handle functionNameToCall, handle context)
Register as a listener for a game event from script.
- Example
ListenToGameEvent('entity_killed', Dynamic_Wrap(MyCustomGameMode, 'OnEntityKilled'), self)
Parameters
| Type | Name | Description |
|---|---|---|
| string | EventName | No Description Set |
| handle | functionNameToCall | No Description Set |
| handle | context | No Description Set |
Returns
int - a handle for the event/function pair