---
name: "triggerAttachObject"
type: command
status: ok
groups: ["Triggers"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/triggerAttachObject
revid: 336715
updated: 2023-01-04T15:24:43Z
---

# triggerAttachObject

*Command · Triggers · Arma 3 v0.50 · introduced in Operation Flashpoint: Elite v1.00*

## Description

Assigns a static object to the trigger. The activation source is changed to "STATIC".

## Syntax

```sqf
triggerName triggerAttachObject objectId
```

**Parameters:**

- `triggerName`: [Object](../topics/Object.md)
- `objectId`: [Number](../topics/Number.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
_trigger triggerAttachObject 1234;
```

## See also

[attachObject](../commands/attachObject.md) · [attachTo](../commands/attachTo.md) · [attachedObjects](../commands/attachedObjects.md) · [attachedTo](../commands/attachedTo.md) · [waypointAttachVehicle](../commands/waypointAttachVehicle.md) · [waypointAttachedVehicle](../commands/waypointAttachedVehicle.md) · [lightAttachObject](../commands/lightAttachObject.md) · [triggerAttachVehicle](../commands/triggerAttachVehicle.md) · [attachedObject](../commands/attachedObject.md) · [triggerAttachedVehicle](../commands/triggerAttachedVehicle.md) · [triggerInterval](../commands/triggerInterval.md) · [setTriggerInterval](../commands/setTriggerInterval.md) · [enableSimulation](../commands/enableSimulation.md) · [simulationEnabled](../commands/simulationEnabled.md)

## Community notes

**Killzone_Kid** — 2013-10-31

This command doesn't quite work in Arma 3: see [](../commands/triggerAttachObject.md)

Further investigation reveals that objectId param for this command is some kind of map id and not the id you can see in the editor. This map id could be seen in multiplayer when looking at [netId](../commands/netId.md) of the static objects, for example "1:-23984219837", the -23984219837 would be the objectId. Unfortunately it still doesn't work.

<sub>Source: [BI Community Wiki — triggerAttachObject](https://community.bistudio.com/wiki/triggerAttachObject) (revision 336715).</sub>
