{"name":"ppEffectEnable","operator":null,"title":"ppEffectEnable","type":"command","url":"https://community.bistudio.com/wiki/ppEffectEnable","revid":363568,"updated":"2024-04-07T08:27:59Z","groups":["Camera Control"],"status":"ok","replaced_by":[],"games":[{"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":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Enable / disable Post Process Effects\n\n> [!IMPORTANT]\n> If effect fails to get enabled (can check it with ppEffectEnabled) try adding a little sleep in front of it.","syntaxes":[{"syntax":"effect ppEffectEnable enable","since":null,"effect":null,"exec":null,"params":[{"name":"effect","type":"String","optional":false,"default":null,"description":"name of the effect","types":["String"],"since":null,"text":"effect: String - name of the effect"},{"name":"enable","type":"Boolean","optional":false,"default":null,"description":null,"types":["Boolean"],"since":null,"text":"enable: Boolean"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"effect","types":["String"]},"right":{"text":"enable","types":["Boolean"]}},{"syntax":"effect ppEffectEnable enable","since":null,"effect":null,"exec":null,"params":[{"name":"effect","type":"Number","optional":false,"default":null,"description":"handle of the effect","types":["Number"],"since":null,"text":"effect: Number - handle of the effect"},{"name":"enable","type":"Boolean","optional":false,"default":null,"description":null,"types":["Boolean"],"since":null,"text":"enable: Boolean"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"effect","types":["Number"]},"right":{"text":"enable","types":["Boolean"]}},{"syntax":"effectArray ppEffectEnable enable","since":null,"effect":null,"exec":null,"params":[{"name":"effectArray","type":"Array of Numbers","optional":false,"default":null,"description":"array of effect handles","types":["Array","Number"],"since":null,"text":"effectArray: Array of Numbers - array of effect handles"},{"name":"enable","type":"Boolean","optional":false,"default":null,"description":null,"types":["Boolean"],"since":null,"text":"enable: Boolean"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"effectArray","types":["Array","Number"]},"right":{"text":"enable","types":["Boolean"]}}],"examples":[{"text":"```sqf\n\"colorCorrections\" ppEffectEnable true;\n```","code":["\"colorCorrections\" ppEffectEnable true;"]},{"text":"```sqf\n_hndl ppEffectEnable true;\n```","code":["_hndl ppEffectEnable true;"]},{"text":"```sqf\n[_hndl1, _hndl2] ppEffectEnable true;\n```","code":["[_hndl1, _hndl2] ppEffectEnable true;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Post Process Effects","ppEffectForceInNVG","ppEffectDestroy","ppEffectCreate","ppEffectEnabled","ppEffectCommit","ppEffectCommitted","ppEffectAdjust"],"notes":[{"user":"Pi123263","date":"2024-04-06T13:32:57Z","text":"Using ppEffectEnable immediatelly enables/disables the effect. If you want the effect to fade in/out it might be better to use ppEffectAdjust.\n\nIf you want to fade out an effect using ppEffectAdjust you can set the values for the command back to the default and then use ppEffectCommit to set the time for the fadeout.\n\nExample:\nActivate effect:\n\n```sqf\n\"colorCorrections\" ppEffectAdjust [1,1,0,[0,0,0,0],[0,0,0,0.24],[1,1,1,0],[0.6,0.5,0,0,-0.1,0.4,0.8]]; \n\"colorCorrections\" ppEffectEnable true; \n\"colorCorrections\" ppEffectCommit 0;\n```\n\nAnd then fade the effect out over 10 seconds:\n\n```sqf\n\"colorCorrections\" ppEffectAdjust [1,1,0,[0,0,0,0],[1,1,1,1],[0.299, 0.587, 0.114, 0],[-1,-1,0,0,0,0,0]]; \n\"colorCorrections\" ppEffectCommit 10;\n```"}],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Camera Control","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}