Jump to content
Sign in to follow this  
 EO

Need help with a piece of code

Recommended Posts

I have a piece of code that i can enter into the debug console that enables a color filter, see screenshot.

http://cloud-4.steampowered.com/ugc/533996510398514418/2FFC52BD702AF52FD20C73FBD79B5D318B0221FF/

How do repackage the piece of code to file format so's to enble the color filter in a mission i'm making. Here is the piece of code i apply to the debug console.

_hndl ppEffectAdjust [ .4, 1, 0, [1.01, -2.46, -1.23, 0],[2.11, 1.6, 0.71, 0.4],[0.83, 0.56, 0.29, 0.0]];

"colorCorrections" ppEffectAdjust [ .4, 1, 0, [1.01, -2.46, -1.23, 0],[2.11, 1.6, 0.71, 0.4],[0.83, 0.56, 0.29, 0.0]]; "colorCorrections" ppEffectCommit 0; "colorCorrections" ppEffectAdjust [ .4, 1, 0, [1.01, -2.46, -1.23, 0],[2.11, 1.6, 0.71, 0.4],[0.83, 0.56, 0.29, 0.0]]; "colorCorrections" ppEffectCommit 1.5; "colorCorrections" ppEffectEnable true;

I hope this makes sense to someone!!

Share this post


Link to post
Share on other sites

If you want these screen effects active on your mission start, then add this to init.sqf

"colorCorrections" ppEffectAdjust [ .4, 1, 0, [1.01, -2.46, -1.23, 0],[2.11, 1.6, 0.71, 0.4],[0.83, 0.56, 0.29, 0.0]];
"colorCorrections" ppEffectCommit 0; "colorCorrections" ppEffectAdjust [ .4, 1, 0, [1.01, -2.46, -1.23, 0],[2.11, 1.6, 0.71, 0.4],[0.83, 0.56, 0.29, 0.0]];
"colorCorrections" ppEffectCommit 1.5; "colorCorrections" ppEffectEnable true;

Share this post


Link to post
Share on other sites

I am assuming that you just want to have that bit of code ran into a mission? What you need to do is create a .sqf file in your mission folder

So for this code you can create a script called

ColorEffect.sqf

Then inside that file you would simply put the code above

_hndl ppEffectAdjust [ .4, 1, 0, [1.01, -2.46, -1.23, 0],[2.11, 1.6, 0.71, 0.4],[0.83, 0.56, 0.29, 0.0]];
"colorCorrections" ppEffectAdjust [ .4, 1, 0, [1.01, -2.46, -1.23, 0],[2.11, 1.6, 0.71, 0.4],[0.83, 0.56, 0.29, 0.0]]; 
"colorCorrections" ppEffectCommit 0; 
"colorCorrections" ppEffectAdjust [ .4, 1, 0, [1.01, -2.46, -1.23, 0],[2.11, 1.6, 0.71, 0.4],[0.83, 0.56, 0.29, 0.0]]; 
"colorCorrections" ppEffectCommit 1.5; 
"colorCorrections" ppEffectEnable true;

Then you create another file in your mission folder named init.sqf.

In the init.sqf you have the following code

[] execVM "ColorEffect.sqf"

Edit: Or do what Beerkan said :> Much easier

Share this post


Link to post
Share on other sites

Thanks guys...i think i'll go with Beerkan's suggestion....i like simple!!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×