hawkie52

Creepy Night Fog for Exile

85 posts in this topic

This origin old codes were from A2 

Old codes

 

Now it can working with A3 Exile,the fog will start when at night around player or player vehicles.

 

1,Create a sqf file named "ground_fog.sqf"

2,ground_fog.sqf

Spoiler

// Ground Fog - TorturedChunk - Kaysi - mmmyum @ OpenDayZ.net

//Modify By CNSU
waitUntil {!isNull player};                                                                                                                                                                                                                                                                                                                                                                                     
doofog = {
private ["_obj","_pos","_fog1","_fog2","_fog3","_inVehicle"];
        _inVehicle = (vehicle player != player);
 
        if (_inVehicle) then {
            _obj = (vehicle player);
        } else {
            _obj = player;
        };
 
        _pos = position _obj;
 
        _fog1 = "#particlesource" createVehicleLocal _pos;
        _fog1 setParticleParams [
        ["\A3\Data_F\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 [
        ["\A3\Data_F\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 [
        ["\A3\Data_F\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;
 
        _this setVariable ["playerfog", floor time + 5];
 
        sleep 120;
 
        deleteVehicle _fog1;
        deleteVehicle _fog2;
        deleteVehicle _fog3;
    };
[] spawn {
    while {true} do {
        if(daytime < 7 || daytime > 19) then {
            if (player getVariable ["playerfog", -1] < time) then {
                player setVariable ["playerfog", floor time + 5];
                player spawn doofog;
                sleep 120;
            };
        };
    };
};

3,init.sqf

Spoiler

_GF = [] execVM "ground_fog.sqf";

4,If you want change daytime,pls check line 58 change the daytime numbers.

  • Like 6

Share this post


Link to post
Share on other sites
Advertisement
1 hour ago, John said:

Seemingly has quite a hefty FPS hit on the individual.

Not really drop too much FPS.Fogs were create around units when not move,if you move fast,fogs were disappear,also if you left game those will delete in seconds.

Share this post


Link to post
Share on other sites

Just installed it and ran around Esseker for about 30 minutes being chased by AI and zeds and FPS stayed at 47 the whole time. Alone on the server though.

Share this post


Link to post
Share on other sites
21 hours ago, hawkie52 said:

What you mean? Random locations?

I think he means adding it as a potential weather choice in config.cpp

keyframes[] = {"Sunny", "Cloudy", "Thunderstorm"};

 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.