{"name":"setLightAmbient","operator":null,"title":"setLightAmbient","type":"command","url":"https://community.bistudio.com/wiki/setLightAmbient","revid":377373,"updated":"2026-01-02T06:42:43Z","groups":["Lights"],"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":"local","effect":"local","server_exec":false},"exec":null,"description":"Set ambient color of light. This includes surfaces that **face away** from the light, unlike setLightColor.","syntaxes":[{"syntax":"light setLightAmbient color","since":null,"effect":null,"exec":null,"params":[{"name":"light","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"light: Object"},{"name":"color","type":null,"optional":false,"default":null,"description":"Color (RGB)","types":["Color"],"since":null,"text":"color: Color (RGB)"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"light","types":["Object"]},"right":{"text":"color","types":["Color"]}}],"examples":[{"text":"```sqf\nmyLight setLightAmbient [0.5,0,0]; // produces red light around the origin source\n```","code":["myLight setLightAmbient [0.5,0,0]; // produces red light around the origin source"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setLightColor","setLightBrightness","lightAttachObject","lightDetachObject","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight"],"notes":[{"user":"Feersum","date":"2006-12-01T16:42:00Z","text":"Light can be created with command createVehicleLocal with special vehicle class \"#lightpoint\".\n\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":"ColonelSandersLite","date":"2007-08-17T07:15:00Z","text":"To clarify:\n\n- setLightAmbient - Terrain and surrounding objects are bathed in this colour.\n- setLightColor - Controls the \"haze\" seen around the lightsource (ex flares)."},{"user":"Ffur2007slx2_5","date":"2014-03-25T10:06:00Z","text":"When both setLightAmbient and setLightColor were [0,0,0], there won’t be any visual presentation on the light source."}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Lights","Introduced with Operation Flashpoint: Elite version 1.00","Operation Flashpoint: Elite: New Scripting Commands","Operation Flashpoint: Elite: Scripting Commands","Scripting Commands","Scripting Commands: Local Effect","Take On Helicopters: Scripting Commands"]}