Static function
Fast
Entity.Subscribe
Subscribes to an <a href='/docs/core-concepts/scripting/events-guide'>Event</a> for all entities of this Class
Syntax
Entity.Subscribe(event_name, callback)
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
event_name
|
string | — | Name of the event to subscribe to |
callback
|
function | — | Function to call when the event is triggered |
Returns
- function Callback that was passed (useful for unsubscribing later if your callback is an anonymous function)