Audio Rejectz
Well-Known Member
A few people have been asking for this, so thought id make a fresh post as the other one wasn't specifically aimed at this. PLEASE NOTE - when doing this you will need to update you BE scripts as you will get for script rescription #21 and a couple others, i cant remember which ones but they should be easy enough to amend
Anyway. here it is.
Open your mission file and create a file called effects.sqf and then put in the code below
effects.sqf
Then in your ini file put this:
There you go
Please note that the way i have this set up is for quite an extreme storm, it really adds some tense moments not being able to see people within a few hundred meters
If you want just the snow, and not the effect i use then delete this from the top code
Or you can play with the settings to your likeing, setfog 1 is max fog, where as setfog 0 is obviously nothing. The reason i setview distance to 900, is to add performance. As on our server you cant see that far anyway
On another note - If you would like to force your sever to have no fog at all, and let people see over 6000 meters, put this into the effects ini
With the settings above, there will be no fog AT ALL, it wont ever rain and will always be clear skies.
Hope this helps
Anyway. here it is.
Open your mission file and create a file called effects.sqf and then put in the code below
effects.sqf
Code:
//Snow Storm
//Modified by Audio Rejectz, all credits go to original creators JW - Snow script / BI - Wind & Dust particles
"filmGrain" ppEffectEnable true;
"filmGrain" ppEffectAdjust [0.02, 1, 1, 0.1, 1, false];
"filmGrain" ppEffectCommit 5;
setviewdistance 900;
bis_fog = 0.8;
setviewdistance 900;
0 setovercast 0.9;
0 setrain 1;
//0 setfog 0.8;
0 setfog bis_fog;
[] spawn {
_delay = 3;
sleep 0.01;
while {true} do {
_delay setovercast 0.9;
_delay setrain 1;
_delay setfog bis_fog;
sleep _delay ;
};
};
//--- Wind & Dust
[] spawn {
waituntil {isplayer player};
setwind [0.201112,0.204166,true];
while {true} do {
_ran = ceil random 5;
playsound format ["wind_%1",_ran];
_obj = vehicle player;
_pos = position _obj;
//--- Dust
setwind [0.201112*2,0.204166*2,false];
_velocity = [random 10,random 10,-1];
_color = [1.0, 0.9, 0.8];
_alpha = 0.02 + random 0.02;
_ps = "#particlesource" createVehicleLocal _pos;
_ps setParticleParams [["\Ca\Data\ParticleEffects\Universal\universal.p3d", 16, 12, 8], "", "Billboard", 1, 3, [0, 0, -6], _velocity, 1, 1.275, 1, 0, [9], [_color + [0], _color + [_alpha], _color + [0]], [1000], 1, 0, "", "", _obj];
_ps setParticleRandom [3, [30, 30, 0], [0, 0, 0], 1, 0, [0, 0, 0, 0.01], 0, 0];
_ps setParticleCircle [0.1, [0, 0, 0]];
_ps setDropInterval 0.01;
sleep (random 1);
deletevehicle _ps;
_delay = 10 + random 20;
sleep _delay;
};
};
//Snow script
setWind [0, -5, true];
_obj = player;
_pos = position (vehicle _obj);
_d = 15;
_h = 12;
_h1 = 8;
_h2 = 4;
_density = 20000;
_fog1 = "#particlesource" createVehicleLocal _pos;
_fog1 setParticleParams [
["\Ca\Data\ParticleEffects\Universal\universal.p3d" , 16, 12, 13, 0], "", "Billboard", 1, 10,
[0, 0, -6], [0, 0, 0], 1, 1.275, 1, 0,
[7,6], [[1, 1, 1, 0], [1, 1, 1, 0.04], [1, 1, 1, 0]], [1000], 1, 0, "", "", _obj
];
_fog1 setParticleRandom [3, [55, 55, 0.2], [0, 0, -0.1], 2, 0.45, [0, 0, 0, 0.1], 0, 0];
_fog1 setParticleCircle [0.001, [0, 0, -0.12]];
_fog1 setDropInterval 0.01;
_fog2 = "#particlesource" createVehicleLocal _pos;
_fog2 setParticleParams [
["\Ca\Data\ParticleEffects\Universal\universal.p3d" , 16, 12, 13, 0], "", "Billboard", 1, 10,
[0, 0, -6], [0, 0, 0], 1, 1.275, 1, 0,
[7,6], [[1, 1, 1, 0], [1, 1, 1, 0.04], [1, 1, 1, 0]], [1000], 1, 0, "", "", _obj
];
_fog2 setParticleRandom [3, [55, 55, 0.2], [0, 0, -0.1], 2, 0.45, [0, 0, 0, 0.1], 0, 0];
_fog2 setParticleCircle [0.001, [0, 0, -0.12]];
_fog2 setDropInterval 0.01;
_fog3 = "#particlesource" createVehicleLocal _pos;
_fog3 setParticleParams [
["\Ca\Data\ParticleEffects\Universal\universal.p3d" , 16, 12, 13, 0], "", "Billboard", 1, 10,
[0, 0, -6], [0, 0, 0], 1, 1.275, 1, 0,
[7,6], [[1, 1, 1, 0], [1, 1, 1, 0.04], [1, 1, 1, 0]], [1000], 1, 0, "", "", _obj
];
_fog3 setParticleRandom [3, [55, 55, 0.2], [0, 0, -0.1], 2, 0.45, [0, 0, 0, 0.1], 0, 0];
_fog3 setParticleCircle [0.001, [0, 0, -0.12]];
_fog3 setDropInterval 0.01;
while {true} do
{
_a = 0;
while { _a < _density } do
{
_pos = position player;
_fog1 setpos _pos;
_fog2 setpos _pos;
_fog3 setpos _pos;
0 setRain 0;
_dpos = [((_pos select 0) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 1) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 2) + _h)];
drop ["\ca\data\cl_water", "", "Billboard", 1, 7, _dpos, [0,0,-1], 1, 0.0000001, 0.000, 0.7, [0.07], [[1,1,1,0], [1,1,1,1], [1,1,1,1], [1,1,1,1]], [0,0], 0.2, 1.2, "", "", ""]; _a = _a + 1;
_dpos = [((_pos select 0) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 1) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 2) + _h1)];
drop ["\ca\data\cl_water", "", "Billboard", 1, 7, _dpos, [0,0,-1], 1, 0.0000001, 0.000, 0.7, [0.07], [[1,1,1,0], [1,1,1,1], [1,1,1,1], [1,1,1,1]], [0,0], 0.2, 1.2, "", "", ""];
_dpos = [((_pos select 0) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 1) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 2) + _h2)];
drop ["\ca\data\cl_water", "", "Billboard", 1, 7, _dpos, [0,0,-1], 1, 0.0000001, 0.000, 0.7, [0.07], [[1,1,1,0], [1,1,1,1], [1,1,1,1], [1,1,1,1]], [0,0], 0.2, 1.2, "", "", ""];
};
sleep 0.2;
};
Then in your ini file put this:
Code:
// SnowStorm:
if (!isDedicated) then {
[] execVM "effects.sqf";
};
There you go
Please note that the way i have this set up is for quite an extreme storm, it really adds some tense moments not being able to see people within a few hundred meters
If you want just the snow, and not the effect i use then delete this from the top code
Code:
setviewdistance 900;
bis_fog = 0.8;
setviewdistance 900;
0 setovercast 0.9;
0 setrain 1;
//0 setfog 0.8;
0 setfog bis_fog
Or you can play with the settings to your likeing, setfog 1 is max fog, where as setfog 0 is obviously nothing. The reason i setview distance to 900, is to add performance. As on our server you cant see that far anyway
On another note - If you would like to force your sever to have no fog at all, and let people see over 6000 meters, put this into the effects ini
Code:
setviewdistance 9000;
bis_fog = 0;
setviewdistance 9000;
0 setovercast 0;
0 setrain 1;
//0 setfog 0;
0 setfog bis_fog
With the settings above, there will be no fog AT ALL, it wont ever rain and will always be clear skies.
Hope this helps