Ground Fog - Guide

In your mission.pbo
Code:
      };
        class Item4
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={6742.6514,300.82608,7825.8774};
                    placement=12000;
                    special="NONE";
                    age="ACTUAL";
                    id=187;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,12000,12000,7,20] exec ""fogs.sqs""";
                };
            };
this means fog from 20 o'clock to 7 o'clock and fog should disapear after 0.9 sec +- the #waittoactivate 0.15 sec. just use my code for example.

in your fogs.sqs
Code:
_height=-2.5
_Rradius=500
_Cloudalpha=1.5
?((Player distance _Center)>_dist1):_Cloudalpha= 1-(((Player distance _Center) - _dist1)/(_dist2- _dist1))
_radius=(random 0.2)+random _Rradius
_angle=(random 360)
_size = 15
_col = 1
_CC=[_col,_col,_col,.7*_Cloudalpha]
drop ["\ca\data\cl_basic", "", "Billboard", 50,50,  [(getpos Player select 0)+_radius*(sin(_angle)),(getpos Player select 1)+_radius*(cos(_angle)),_height],[1,1,1],20 , 0.2, 0.1568, 0,[_size], [[_col,_col,_col,0],_CC,_CC,_CC,_CC,_CC,_CC,[_col,_col,_col,0]], [0],0,0,"", "",""]
_i=_i+1
?(_i<900):goto "loop"
~1
?(count _this == 3): goto "bigloop"
goto "nighttest"
#waittoactivate
~150
goto "nighttest"
#waittoactivate ~150 is the time to start check for the servertime
Example

Example

Also u need to set time on your server.
for example: [GMT+2]
just put it in your servername and it should work.

Sorry for my english.
 
Alright so I want the fog to appear along the coast only. So say from kamenka to up past berenizno and only go inland about 1000 to 1500m.

What values do I need to change? I edited the following line but it still spawns on the whole map...

Code:
init="[this, 1000, 16000, 7, 19] exec ""fog.sqs""";
 
In order to get the best result i would do it like this
035AED643BD6B2D017C4B811CD90A645B549C5C5

so as u can c here, i've set many logics arround the coast maybe 100m-200m inland.Since Yac (the orginal creator of this script) used gamelogic instead of triggers u would do it like this.
Code example for one elipse:
Code:
init="[this,500,500] exec ""fogs.sqs""";
no time set for purpose test.
Best way is to start DayZ mod make a Lan Game and load your mission.sqm with the Editor.

Just put your fog.sqs in:
Drive:\Users\User\Documents\ArmA 2 Other Profiles\Profile\MPMissions\Map
together with your mission file

feel free to ask more

mission.sqm example

Greatz C.Project
 
I cannot get this working for the life of me :( I've put all the code in the right place but no fog ;'(

Need more info for help:

--- RPT log ---
--- Where did you get stuck at ? ---
--- did u edit/set your fog.sqf ? and if how ? ---
--- how did u edit/set your mission.sqm class item for the fog.sqs ? ---
 
Need more info for help:

--- RPT log ---
--- Where did you get stuck at ? ---
--- did u edit/set your fog.sqf ? and if how ? ---
--- how did u edit/set your mission.sqm class item for the fog.sqs ? ---
I copied everything from the origninal post into the mission.sqm file and created the fogs.sqs file. I've run through the code to miss out glaring spelling mistakes but no cigar.

Is there anything I need to do above and beyond the original post?
I've installed loads of custom mods/scripts and this is the only one to cause me hassle lol.

I like your idea of Fog aswell C.project, it should cascade from the cost line and become less visible in land. How would I conver your logic for my game....providing I get this working lol.
 
Is there anything I need to do above and beyond the original post?
I've installed loads of custom mods/scripts and this is the only one to cause me hassle lol.
depends on what u have done ? did u set up a time based fog (were u have to set server time)
or 24/7 fog ?
Have u checked items=XX; so u dont have dobule "class Item10" for example ?

Our server runs tons of mods and extra features and sometimes,
just for me and other admin,
the fog isnt starting a loop it takes a while for it to do
but normal player see the fog from start to end.
Also happens when teleporting from A to B.

I like your idea of Fog aswell C.project, it should cascade from the cost line and become less visible in land. How would I conver your logic for my game....providing I get this working lol.

simple copy the class items and paste them to your mission.sqm and adjust items=XX;
under class groups.
and to make it less visible inland just set 2 bigger triggers on East and south site of map ....
adjust your fog.sqs at line 18 "_Cloudalpha=0.7"

Code:
........ATTENTION THIS IS NOT THE FULL CODE !!!!!................ATTENTION THIS IS NOT THE FULL CODE !!!!!........ATTENTION THIS IS NOT THE FULL CODE !!!!!................ATTENTION THIS IS NOT THE FULL CODE !!!!!........ATTENTION THIS IS NOT THE FULL CODE !!!!!........
 
_height=-2.5                            // starting height of fog
_Rradius=500                            // radius player can see the fog (Player = Center)
_Cloudalpha=0.7                            // Cloud alpha 0.1 means realy less visible 5 means hell what visible
?((Player distance _Center)>_dist1):_Cloudalpha= 1-(((Player distance _Center) - _dist1)/(_dist2- _dist1))
_radius=(random 0.5)+random _Rradius    // the random radius added to the normal radius
_angle=(random 360)                        // points random 360 degrees arround the player
_size = 17                                // size of 1 cloud
_col = 1                                // color of 1 cloud (i think 1 is white and 1.1 and above will make it more grey and later black)            --->    [1,1,1],20 , 0.2, 0.1568, 0, <------ movement and other things like up and down, left and right directions, can be found below
_CC=[_col,_col,_col,.1*_Cloudalpha]   
drop ["\ca\data\cl_basic", "", "Billboard", 50,50,  [(getpos Player select 0)+_radius*(sin(_angle)),(getpos Player select 1)+_radius*(cos(_angle)),_height],[1,1,1],20 , 0.2, 0.1568, 0,[_size], [[_col,_col,_col,0],_CC,_CC,_CC,_CC,_CC,_CC,[_col,_col,_col,0]], [0],0,0,"", "",""]
 
........ATTENTION THIS IS NOT THE FULL CODE !!!!!................ATTENTION THIS IS NOT THE FULL CODE !!!!!........ATTENTION THIS IS NOT THE FULL CODE !!!!!................ATTENTION THIS IS NOT THE FULL CODE !!!!!........ATTENTION THIS IS NOT THE FULL CODE !!!!!.......
 
depends on what u have done ? did u set up a time based fog (were u have to set server time)
or 24/7 fog ?
Have u checked items=XX; so u dont have dobule "class Item10" for example ?

Our server runs tons of mods and extra features and sometimes,
just for me and other admin,
the fog isnt starting a loop it takes a while for it to do
but normal player see the fog from start to end.
Also happens when teleporting from A to B.



simple copy the class items and paste them to your mission.sqm and adjust items=XX;
under class groups.
and to make it less visible inland just set 2 bigger triggers on East and south site of map ....
adjust your fog.sqs at line 18 "_Cloudalpha=0.7"

Code:
........ATTENTION THIS IS NOT THE FULL CODE !!!!!................ATTENTION THIS IS NOT THE FULL CODE !!!!!........ATTENTION THIS IS NOT THE FULL CODE !!!!!................ATTENTION THIS IS NOT THE FULL CODE !!!!!........ATTENTION THIS IS NOT THE FULL CODE !!!!!........
 
_height=-2.5                            // starting height of fog
_Rradius=500                            // radius player can see the fog (Player = Center)
_Cloudalpha=0.7                            // Cloud alpha 0.1 means realy less visible 5 means hell what visible
?((Player distance _Center)>_dist1):_Cloudalpha= 1-(((Player distance _Center) - _dist1)/(_dist2- _dist1))
_radius=(random 0.5)+random _Rradius    // the random radius added to the normal radius
_angle=(random 360)                        // points random 360 degrees arround the player
_size = 17                                // size of 1 cloud
_col = 1                                // color of 1 cloud (i think 1 is white and 1.1 and above will make it more grey and later black)            --->    [1,1,1],20 , 0.2, 0.1568, 0, <------ movement and other things like up and down, left and right directions, can be found below
_CC=[_col,_col,_col,.1*_Cloudalpha]   
drop ["\ca\data\cl_basic", "", "Billboard", 50,50,  [(getpos Player select 0)+_radius*(sin(_angle)),(getpos Player select 1)+_radius*(cos(_angle)),_height],[1,1,1],20 , 0.2, 0.1568, 0,[_size], [[_col,_col,_col,0],_CC,_CC,_CC,_CC,_CC,_CC,[_col,_col,_col,0]], [0],0,0,"", "",""]
 
........ATTENTION THIS IS NOT THE FULL CODE !!!!!................ATTENTION THIS IS NOT THE FULL CODE !!!!!........ATTENTION THIS IS NOT THE FULL CODE !!!!!................ATTENTION THIS IS NOT THE FULL CODE !!!!!........ATTENTION THIS IS NOT THE FULL CODE !!!!!.......

It was a time based factor I used, I tried a few people's code to be honest. Thanks for the help this far, it's genuinely appreciated. See if I upload my mission.sqm and fogs.sqs do you think you could have a look at it and help me get it working?
 
this is still your mission file with the only 1 fog trigger that was at the end of file.
so u still have to add the other 65 fog classes ^.^ but now u have an example on how to....
anyways if i am not to bored i will to it right now and reupload your mission if u are allright with my mission.sqm so that the fog is only at coast area ....
 
this is still your mission file with the only 1 fog trigger that was at the end of file.
so u still have to add the other 65 fog classes ^.^ but now u have an example on how to....
anyways if i am not to bored i will to it right now and reupload your mission if u are allright with my mission.sqm so that the fog is only at coast area ....

If you could that would be legendary :D if not i'll work my way through it. I only want fog/mist at the cost anyway its not logical to have it anywhere else imo :D
 
Your mission.sqm my coastfog in it.

I'm going to :D. Is there an easy way to get the fog to spawn all over the map or do I need to put more logics?

Yea, just use one class item of fogs.sqs

24/7 Fog
Code:
        };
        class Item1
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={6732.3652,301.50659,7825.8496};
                    placement=12000;
                    id=188;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,12000,12000] exec ""fogs.sqs""";
                };
            };

8-20 Fog
Code:
        };
        class Item1
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={6732.3652,301.50659,7825.8496};
                    placement=12000;
                    id=188;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,12000,12000,8,20] exec ""fogs.sqs""";
                };
            };
 
Your mission.sqm my coastfog in it.



Yea, just use one class item of fogs.sqs

24/7 Fog
Code:
        };
        class Item1
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={6732.3652,301.50659,7825.8496};
                    placement=12000;
                    id=188;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,12000,12000] exec ""fogs.sqs""";
                };
            };

8-20 Fog
Code:
        };
        class Item1
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={6732.3652,301.50659,7825.8496};
                    placement=12000;
                    id=188;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,12000,12000,8,20] exec ""fogs.sqs""";
                };
            };


Thanks :D I appreciate the effort you have put in to help me :D.

The items at the bottom would I just add them to the mission for all over fog? time restricted and 24/7?
 
either u want 24/7 or 8-20 o'clock fog u have to edit
8-20
Code:
init="[this,12000,12000,8,20] exec ""fogs.sqs""";
24/ 7
Code:
init="[this,12000,12000] exec ""fogs.sqs""";
in each class
for fog everywhere its the same but less work coz there is only 1 class of fog =)
 
Nice one. 24/7 is a tad overkill imo.

So to confirm, would code below give me all over fog between 8-20?

};
class Item1
{
side="LOGIC";
class Vehicles
{
items=1;
class Item0
{
position[]={6732.3652,301.50659,7825.8496};
placement=12000;
id=188;
side="LOGIC";
vehicle="Logic";
leader=1;
skill=0.60000002;
init="[this,12000,12000,8,20] exec ""fogs.sqs""";
};
};
 
Back
Top