{"name":"ppEffectCreate","operator":null,"title":"ppEffectCreate","type":"command","url":"https://community.bistudio.com/wiki/ppEffectCreate","revid":376949,"updated":"2025-12-31T23:30:11Z","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":"Creates Post Process Effects specified by effect name and priority.\n\nSupported effects:\n- \"RadialBlur\"\n- \"ChromAberration\"\n- \"WetDistortion\"\n- \"ColorCorrections\"\n- \"DynamicBlur\"\n- \"FilmGrain\"\n- \"ColorInversion\"\n- \"SSAO\"\n- \"Resolution\"","syntaxes":[{"syntax":"ppEffectCreate [name, priority]","since":null,"effect":null,"exec":null,"params":[{"name":"name","type":"String","optional":false,"default":null,"description":"name of effect type","types":["String"],"since":null,"text":"name: String - name of effect type"},{"name":"priority","type":"Number","optional":false,"default":null,"description":"unique priority, defines order of applying effect to the scene. If there is another effect using the same priority, creation will fail","types":["Number"],"since":null,"text":"priority: Number - unique priority, defines order of applying effect to the scene. If there is another effect using the same priority, creation will fail"}],"returns":{"type":"Number","types":["Number"],"description":"handle or -1 if failed","text":"Number - handle or -1 if failed"},"form":"unary","operator":null,"left":null,"right":{"text":"[name, priority]","types":["Array"]}},{"syntax":"ppEffectCreate [[name1, priority1], ...]","since":null,"effect":null,"exec":null,"params":[{"name":"nameN","type":"String","optional":false,"default":null,"description":"name of effect type","types":["String"],"since":null,"text":"nameN: String - name of effect type"},{"name":"priorityN","type":"Number","optional":false,"default":null,"description":"unique priority, defines order of applying effect to the scene. If there is another effect using the same priority, creation will fail","types":["Number"],"since":null,"text":"priorityN: Number - unique priority, defines order of applying effect to the scene. If there is another effect using the same priority, creation will fail"}],"returns":{"type":"Array of Numbers or Nothing if failed","types":["Array","Number","Nothing"],"description":null,"text":"Array of Numbers or Nothing if failed"},"form":"unary","operator":null,"left":null,"right":{"text":"[[name1, priority1], ...]","types":["Array"]}}],"examples":[{"text":"```sqf\n_ppGrain = ppEffectCreate [\"filmGrain\", 2005];\n```","code":["_ppGrain = ppEffectCreate [\"filmGrain\", 2005];"]},{"text":"If an effect ID is already used, the effect is not created. Use the following:\n\n```sqf\nprivate _name = \"ChromAberration\";\nprivate _priority = 200;\nprivate _handle = -1;\nwhile\n{\n    _handle = ppEffectCreate [_name, _priority];\n    _handle < 0;\n} do {\n    _priority = _priority + 1;\n};\n\n// _handle can be used here as usual\n```\n\nor\n\n```sqf\nprivate _name = \"ChromAberration\";\nprivate _priority = 200;\nprivate _handle = -1;\nwaitUntil { _handle = ppEffectCreate [_name, _priority]; _priority = _priority + 1; _handle > 0; };\n\n// _handle can be used here as usual\n```","code":["private _name = \"ChromAberration\";\nprivate _priority = 200;\nprivate _handle = -1;\nwhile\n{\n\t_handle = ppEffectCreate [_name, _priority];\n\t_handle < 0;\n} do {\n\t_priority = _priority + 1;\n};\n\n// _handle can be used here as usual","private _name = \"ChromAberration\";\nprivate _priority = 200;\nprivate _handle = -1;\nwaitUntil { _handle = ppEffectCreate [_name, _priority]; _priority = _priority + 1; _handle > 0; };\n\n// _handle can be used here as usual"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Post Process Effects","ppEffectForceInNVG","ppEffectEnable","ppEffectEnabled","ppEffectDestroy","ppEffectCommit","ppEffectCommitted","ppEffectAdjust"],"notes":[{"user":"Lou Montana","date":"2009-06-29T22:33:00Z","text":"For some examples, check [this forums' topic](http://forums.bistudio.com/showthread.php?t=75528)."},{"user":"Raymix (DayZ)","date":"2015-06-24T04:08:00Z","text":"\"wetDistortion\" only works if handle is used."}],"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"]}