{"name":"setLightAmbient","title":"setLightAmbient","type":"command","url":"https://community.bistudio.com/wiki/setLightAmbient","revid":377373,"updated":"2026-01-02T06:42:43Z","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":"local","effect":"local"},"description":"Set ambient color of light. This includes surfaces that **face away** from the light, unlike setLightColor.","syntaxes":[{"syntax":"light setLightAmbient color","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"color","type":"Color (RGB)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"color"}}],"examples":[{"code":["myLight setLightAmbient [0.5,0,0]; // produces red light around the origin source"]}],"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\".\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."}]}