{"name":"lightAttachObject","title":"lightAttachObject","type":"command","url":"https://community.bistudio.com/wiki/lightAttachObject","revid":377510,"updated":"2026-01-02T06:50:14Z","groups":["Lights"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Attach light to given object at given position on object.","syntaxes":[{"syntax":"light lightAttachObject [object, position]","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"object","type":"Object","type_expr":"Object"},{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"[object, position]"}}],"examples":[{"code":["myLight lightAttachObject [myVehicle, [-0.5,-0.25,1]];"]}],"see_also":["setLightAmbient","setLightBrightness","lightDetachObject","setLightColor","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight","attachObject","attachTo","attachedObjects","attachedTo","waypointAttachVehicle","waypointAttachedVehicle","triggerAttachVehicle","attachedObject"],"notes":[{"user":"Feersum","date":"2006-12-01T16:42:00Z","text":"Light can be created with command createVehicleLocal with special vehicle class \"#lightpoint\"\nfor example:\n\n```sqf\n_light = \"#lightpoint\" createVehicleLocal pos;\n_light setLightBrightness 1.0;\n_light setLightAmbient [0.0, 1.0, 0.0];\n_light setLightColor [0.0, 1.0, 0.0];\n_light lightAttachObject [_object, [0,0,0]];\n```"},{"user":"Waffle SS.","date":"2015-03-31T04:49:00Z","text":"When attached, movement is slow to update (jumpy). Use attachTo when attaching a light to moving objects."}]}