{"name":"triggerAttachObject","operator":null,"title":"triggerAttachObject","type":"command","url":"https://community.bistudio.com/wiki/triggerAttachObject","revid":336715,"updated":"2023-01-04T15:24:43Z","groups":["Triggers"],"status":"ok","replaced_by":[],"games":[{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Assigns a static object to the trigger. The activation source is changed to \"STATIC\".","syntaxes":[{"syntax":"triggerName triggerAttachObject objectId","since":null,"effect":null,"exec":null,"params":[{"name":"triggerName","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"triggerName: Object"},{"name":"objectId","type":"Number","optional":false,"default":null,"description":null,"types":["Number"],"since":null,"text":"objectId: Number"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"triggerName","types":["Object"]},"right":{"text":"objectId","types":["Number"]}}],"examples":[{"text":"```sqf\n_trigger triggerAttachObject 1234;\n```","code":["_trigger triggerAttachObject 1234;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["attachObject","attachTo","attachedObjects","attachedTo","waypointAttachVehicle","waypointAttachedVehicle","lightAttachObject","triggerAttachVehicle","attachedObject","triggerAttachedVehicle","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled"],"notes":[{"user":"Killzone_Kid","date":"2013-10-31T21:56:00Z","text":"This command doesn't quite work in Arma 3: see\n\nFurther 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 of the static objects, for example \"1:-23984219837\", the -23984219837 would be the objectId. Unfortunately it still doesn't work."}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Triggers","Introduced with Operation Flashpoint: Elite version 1.00","Operation Flashpoint: Elite: New Scripting Commands","Operation Flashpoint: Elite: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}