# sm.areaTrigger.createBoxWater

Creates a new box area trigger that represent water ie. certain objects cant be placed in it.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.areaTrigger.createBoxWater(
    dimension,
    position,
    rotation?,
    filter?,
    userdata?
)
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.areaTrigger.md#createboxwater)

> **Deprecated:**
> use [sm.areaTrigger.createBox](../Game-Script-Environment/Static-Functions/sm.areaTrigger.md#createbox) with [sm.areaTrigger.areaTriggerProxyType](../Game-Script-Environment/Static-Functions/sm.areaTrigger.md#areatriggerproxytype) instead.
>

If a filter is specified, the trigger area will only be able to detects objects of that certain type. See [sm.areaTrigger.filter](../Game-Script-Environment/Static-Functions/sm.areaTrigger.md#filter) for more information about filters.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `dimension` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The dimensions of the box. |
| `position` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The world position. |
| `rotation` *(optional)* | [Quat](../Game-Script-Environment/Userdata/Quat.md) | The world rotation. (Defaults to [sm.quat.identity](../Game-Script-Environment/Static-Functions/sm.quat.md#identity)) |
| `filter` *(optional)* | integer | The object types the area trigger may detect. (See [sm.areaTrigger.filter](../Game-Script-Environment/Static-Functions/sm.areaTrigger.md#filter)). (Defaults to sm.areaTrigger.filter.all) |
| `userdata` *(optional)* | table | An optional table of user data |

**Returns:**

| Type | Description |
| --- | --- |
| [AreaTrigger](../Game-Script-Environment/Userdata/AreaTrigger.md) | The created area trigger. |
