Jump to content

Recommended Posts

So I'm trying to add some light snowfall to a mission, I've found some scripts that I use in other missions that have heavier snowfall or blizzards, but I am having trouble finding a script that can add some light snowfall (Like Arma 2:CO had when rain was set in a winter month). I know it's possible since I've seen some videos of some missions utilizing such snow particles, but I've yet to find any options out there.

  • Like 1

Share this post


Link to post
Share on other sites

The snow script that I modified for my mission Hoc Est Bellum starts out as light snow and increases over time. If you can script, you could rip that out of the mission and remove the part that increases the density over time so it just stays light. You can also PM me and I'll provide a modified light version for you later (I won't be home for many hours).

 

  • Like 1

Share this post


Link to post
Share on other sites
22 minutes ago, CrimsonTemplar said:

There's this script made by ALIAS http://steamcommunity.com/sharedfiles/filedetails/?id=786813177&searchtext=Snowstorm

 

It's customisable, can set amount of snow (I believe the amount of snow is dependent on how overcast the map is) and even whether or not it snows indoors.

 

But a fps killer sadly..

 

Share this post


Link to post
Share on other sites

This is the one I use, it's originally the work of JW and I lightly modified it to check if you're inside, and it increases density over time. If you don't want the density to increase, either set _nextChange absurdly high, or remove lines 78 to 82:


// remove this to avoid increased density

    if (time > _nextChange && _density < AZC_MAX_DENSITY) then
    {
        _density = _density + 500;
        _nextChange = _nextChange + 30;
    };

 

There are no sound effects because, well, every snow storm I have been in is incredibly quiet. Dead silence. Kind of eerie. Of course if there are strong winds you would hear that.

Below is the full script. Line 10 is the snow density. If it's too light, experiment with the value.


// light modification of snow blizzard script by JW
private["_fog"];
setWind [0, -5, true];
_obj = _this select 0;
AZC_DO_SNOW = true;
AZC_MAX_DENSITY = 10000;

_pos = position (vehicle _obj);
_d  = 15;
_density = 100; // snow density at start
_nextChange = time + 30;

AZC_FNC_INSIDE = {
    _center = _this;
    _inside = false;
    _worldPos = getPosWorld _center;
    _skyPos = getPosWorld _center vectorAdd [0, 0, 50];
    _line = lineIntersectsSurfaces [_worldPos,_skyPos,_center,objNull,true,1,"GEOM","NONE"];
    if (count _line > 0) then
    {
        _result = _line select 0;
        _house = _result select 3;
        if (_house isKindOf "House") then { _inside = true };
    };
    
    _inside
};

AZC_FNC_CREATE_FOG_EFFECT =
{
    _fog = "#particlesource" createVehicleLocal _pos; 
    _fog 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
    ];
    _fog setParticleRandom [3, [55, 55, 0.2], [0, 0, -0.1], 2, 0.45, [0, 0, 0, 0.1], 0, 0];
    _fog setParticleCircle [0.001, [0, 0, -0.12]];
    _fog setDropInterval 0.001;
    _fog
};

_inside = false;
missionNameSpace setVariable ["AZC_CUSTOM_WEATHER",true];

while { AZC_DO_SNOW } do
{
    _a = 0;
    while { _a < _density } do
    {
        _inside = player call AZC_FNC_INSIDE;
        if (!_inside) then
        {
            _pos = getPosATL (vehicle _obj);
            if (isNil "_fog" && _density > 4000) then
            {
                _fog = call AZC_FNC_CREATE_FOG_EFFECT;
            };
            
            if (!isNil "_fog") then { _fog 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) + 2)];
            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) + 4)];
            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) + 6)];
            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) + 8)];
            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) + 10)];
            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) + 12)];
            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;
        };
    };

    sleep 0.1;
    if (time > _nextChange && _density < AZC_MAX_DENSITY) then
    {
        _density = _density + 500;
        _nextChange = _nextChange + 30;
    };
};

// if snow flag is set to false code will execute here
missionNameSpace setVariable ["AZC_CUSTOM_WEATHER",false];

  • Like 1

Share this post


Link to post
Share on other sites

Thanks! I'll try that out!

I've used ALIAS snowstorm for some missions, but the effect is too strong for the atmosphere I'm looking for.

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

×