{"name":"setAperture","operator":null,"title":"setAperture","type":"command","url":"https://community.bistudio.com/wiki/setAperture","revid":340862,"updated":"2023-05-12T17:05:48Z","groups":["Camera Control","Lights"],"status":"ok","replaced_by":[],"games":[{"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":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":"local","server_exec":false},"exec":null,"description":"Sets custom eye accommodation camera aperture.\n\n> [!NOTE]\n> If HDR is enabled, when setAperture `value` is used it also forces setApertureNew to the following values: [`value`, `value`, `value`, 1].\n> Execute setApertureNew after setAperture to override this default mechanic.\n\n> [!IMPORTANT]\n> The aperture is set to default by the engine at the mission start. If you set it before the mission started it will reset like it never happened.\n> Make sure you set it at the right time (see #Example 2).","syntaxes":[{"syntax":"setAperture aperture","since":null,"effect":null,"exec":null,"params":[{"name":"aperture","type":"Number","optional":false,"default":null,"description":"aperture value; a value  will set the aperture automatically. Maximum value which has an effect seems to be `100`.","types":["Number"],"since":null,"text":"aperture: Number - aperture value; a value  will set the aperture automatically. Maximum value which has an effect seems to be `100`."}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"aperture","types":["Number"]}}],"examples":[{"text":"```sqf\nsetAperture 0.3;\n```","code":["setAperture 0.3;"]},{"text":"```sqf\n0 spawn { sleep 0.1; setAperture 100 };\n```","code":["0 spawn { sleep 0.1; setAperture 100 };"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setApertureNew","apertureParams"],"notes":[{"user":"Namikaze","date":"2009-03-17T19:43:00Z","text":"The aperture value to simulate typical daylight (outdoor) conditions is 50. The aperture value to simulate typical daylight (indoor) conditions is 30.\nSetting the value to less than 20 will result in a very bright scene, suitable for night conditions.\nThe closer the number is to 0, the more light will be let into the lens, to carry on the aperture metaphor.\nDifferent lighting/weather conditions can change the actual indoor and outdoor aperture values. Experiment and test to be sure."}],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Camera Control","Command Group: Lights","Introduced with Armed Assault version 1.00","Scripting Commands","Scripting Commands: Local Effect","Take On Helicopters: Scripting Commands"]}