# AreaTrigger.bindOnProjectile

Binds an area trigger's onProjectile event to a custom callback. The onProjectile event is triggered if a projectile collides with the trigger area

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
areaTrigger:bindOnProjectile( callback, object? )
```

[Open the full Game reference](../Game-Script-Environment/Userdata/AreaTrigger.md#bindonprojectile)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `areaTrigger` | [AreaTrigger](../Game-Script-Environment/Userdata/AreaTrigger.md) | The area trigger instance. |
| `callback` | string | The name of the Lua function to bind. |
| `object` *(optional)* | table | The object that will receive the callback. (optional) |
