Sign in to follow this  
Followers 0
simonbett

fog script

2 posts in this topic

hello all i have a small issue ..im using a fog script but i want to change the fog to appear on day and night ...or just day Either is fine

this is the default script

another simple way is...how can i make the fog appear at day?



// 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 > 23) then {
            if (player getVariable ["playerfog", -1] < time) then {
                player setVariable ["playerfog", floor time + 5];
                player spawn doofog;
                sleep 120;
            };
        };
    };
};

 

Share this post


Link to post
Share on other sites

this 

if(daytime < 7 || daytime > 23) then {
            if (player getVariable ["playerfog", -1] < time) then {
                player setVariable ["playerfog", floor time + 5];
                player spawn doofog;
                sleep 120;
            };
        };

to this 
 

            if (player getVariable ["playerfog", -1] < time) then {
                player setVariable ["playerfog", floor time + 5];
                player spawn doofog;
                sleep 120;
            };

 

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.