> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atlanta.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Event

> The core event management module, used for registering and unregistering Lua functions (callbacks) to be executed when specific triggers are fired.

***

## Access

All event C++ functions are exposed to your Lua script via a single global table named **`event`**. You access individual values by using the dot (`.`) or bracket (`[]`) operator on this table.

```lua Event Usage Example theme={null}
event.set(EventType.Draw, function() end); -- Dot Operator
event["set"]("Tick", function() end); -- Bracket Operator
```

***

## Functions

This section lists all available C++ functions exposed within the global **`event`** table. These functions are used to manage the registration and execution of Lua functions (callbacks) in response to specific module or game triggers.

***

### set

Registers a Lua function (callback) to be executed whenever a specified event is triggered. Returns a boolean indicating the success of the registration.

```lua theme={null}
set(EventType | string: event_type, function: callback): boolean
```

<ParamField path="event_type" type="EventType | string" required>The event to register the callback for. This can be either a numeric value from the **EventType** enumeration (e.g., `EventType.Draw`) or its corresponding string name (e.g., `"Draw"`).</ParamField>
<ParamField path="callback" type="function" required>The Lua function to be executed when the specified event fires.</ParamField>
