Jump to content

Recommended Posts

Hey all, i'm looking for anything on how to get a "ground fog" type of atmosphere... I've looked on the forums but the only post that hit spot on only had 3 replies, and when the guy tried to get an answer, the other just disappeared I guess... But here is a picture or sort of idea I'm looking for... Now I know this isn't Arma 3 and that it's DayZ but I have seen this done in Arma 3 before...

 

6JLohaQ.jpg

  • Like 1

Share this post


Link to post
Share on other sites

I have used this in the past.

 

 

Refer to this posting to fix it for A3 

 

And you have to use the Armaholic link to dl it.

  • Like 2

Share this post


Link to post
Share on other sites

I'd also recommend Harzach's choice too, I used it in a mission a while back....

 

  • Like 3

Share this post


Link to post
Share on other sites

Hello there Socs !

 

There is a similar script in the BMR Mission if i am right.

 

It's  .fsm

Spoiler

/*
Fog script v1.62
Made by Rockhount[BAfH] (visit us on http://www.bafh.eu/ )

Install:
Open the editor, create a new unit/object and put the example into the init of the unit, after that save the mission.
Then open the folder .../Dokuments/ArmA 2 Other Profiles/Nickname/missions/misisonsname and copy the script into the folder.

example: null=[l1,100,11,10,3,7,-0.3,0.1,0.5,1,1,1,13,12,15,true,2,2.1,0.1,4,6,0,3.5,17.5] execFSM "Fog.fsm";
l1 = name of unit (use "" for markers and when you on a  multiplayer session only want to set the fog around the player: run the script once! with 'Player' (not 'this' and not 'name of the unit/object'!!!), example: null=[Player,200,10,... )
If the unit/building was destroyed/died or the marker was deleted, the script will exit automatically!
100 = Maximumdistance
11 = Minimumdistance
10 = Count of clouds
3 = Minimumsize of clouds
7 = Maximumsize of clouds
-0.3 = Height of clouds (must be a bit below the ground to look realistic)
0.1 = Respawntime of clouds
0.5 = Transparency
1,1,1 = Color of clouds
13 = Remove-speed of clouds
12 = Minimumlifetime of clouds
15 = Maximumlifetime of clouds
true = The fog will be effected by wind (for no wind effect: false)
2 = Windstrength (acts only when the wind effect is 'true')
2.1 = Random-direction-period(in seconds) (acts only when the wind effect is 'true')
0.1 = Random-direction-intensity (acts only when the wind effect is 'true')
4,6,0 = Move-direction-speed (x,y,z) - same effect as wind, but constant and adjustable(acts only when the wind effect is 'false')
3.5 = Stardaytime (the fog will spawn when the ingametime is 03:30)
17.5 = Enddaytime (the fog will spawn when the ingametime is 17:30)
RandomDirectionPeriod 2.1 with RandomDirectionIntensity 0.1 means that 0.1 will be added to the direction-speed (x,y,z-randomized) of a moving-cloud every 2.1 seconds.

An example for norrins revive-script:
revive_init.sqf:
NORRNCustomExec1 ="null=[Player,100,11,10,3,7,-0.3,0.1,0.5,1,1,1,13,12,15,true,1,2.1,0.1,4,6,0,0,24] execFSM ""Fog.fsm"";"; // Exec1 occurs following being revived
NORRNCustomExec3 ="null=[Player,100,11,10,3,7,-0.3,0.1,0.5,1,1,1,13,12,15,true,1,2.1,0.1,4,6,0,0,24] execFSM ""Fog.fsm"";"; // Exec3 occurs when you spawn at base
*/
class FSM
{
  fsmName = "Fog";
  class States
  {
    class Start
    {
      name = "Start";
      init = "private [""_Center"",""_xdistanz"",""_mdistanz"",""_dichte"",""_msize"",""_xsize"",""_height"",""_zeit"",""_transparency"",""_col1"",""_col2"",""_col3"",""_mlifetime"",""_xlifetime"",""_spawn"",""_wind"",""_windstrength"",""_forward2"",""_right2"",""_up"",""_dirPeroid"",""_dirIntensity"",""_mtime"",""_xtime""];" \n
       "_Center = _this select 0;" \n
       "_xdistanz = if (count _this > 1) then {_this select 1} else {80};" \n
       "_mdistanz = if (count _this > 2) then {_this select 2} else {10};" \n
       "_dichte = if (count _this > 3) then {_this select 3} else {10};" \n
       "_msize = if (count _this > 4) then {_this select 4} else {3};" \n
       "_xsize = if (count _this > 5) then {_this select 5} else {7};" \n
       "_height = if (count _this > 6) then {_this select 6} else {-0.3};" \n
       "_zeit = if (count _this > 7) then {_this select 7} else {0.1};" \n
       "_transparency = if (count _this > 8) then {_this select 8} else {0.5};" \n
       "_col1 = if (count _this > 9) then {_this select 9} else {1};" \n
       "_col2 = if (count _this > 10) then {_this select 10} else {1};" \n
       "_col3 = if (count _this > 11) then {_this select 11} else {1};" \n
       "_spawn = if (count _this > 12) then {_this select 12} else {15 + (random 1)};" \n
       "_mlifetime = if (count _this > 13) then {_this select 13} else {8 + (random 1)};" \n
       "_xlifetime = if (count _this > 14) then {_this select 14} else {15 + (random 1)};" \n
       "_wind = if (count _this > 15) then {_this select 15} else {true};" \n
       "_windstrength = if ((count _this > 16) && _wind) then {_this select 16} else {1};" \n
       "_dirPeroid =  if ((count _this > 17) && _wind) then {_this select 17} else {0};" \n
       "_dirIntensity =  if ((count _this > 18) && _wind) then {_this select 18} else {0};" \n
       "_forward2 = if ((count _this > 19) && (!(_wind))) then {_this select 19} else {0};" \n
       "_right2 = if ((count _this > 20) && (!(_wind))) then {_this select 20} else {0};" \n
       "_up = if ((count _this > 21) && (!(_wind))) then {_this select 21} else {0};" \n
       "_mtime =  if (count _this > 22) then {_this select 22} else {0};" \n
       "_xtime =  if (count _this > 23) then {_this select 23} else {24};";
      precondition = "";
      class Links
      {
        class isDedicated
        {
          priority = 0.000000;
          to="End";
          precondition = "";
          condition="isDedicated";
          action="";
        };
        class not_isDedicated
        {
          priority = 0.000000;
          to="Fog";
          precondition = "";
          condition="!(isDedicated)";
          action="";
        };
      };
    };
    class Fog
    {
      name = "Fog";
      init = "private [""_time"",""_zeit"",""_x"",""_height"",""_radius"",""_size"",""_msize"",""_xsize"",""_randomdir"",""_CC"",""_Center"",""_xdistanz"",""_mdistanz"",""_dichte"",""_transparency"",""_col1"",""_col2"",""_col3"",""_Pos"",""_lifetime"",""_mlifetime"",""_xlifetime"",""_spawn"",""_wind"",""_windstrength"",""_right"",""_forward"",""_up"",""_forward2"",""_right2"",""_dirPeroid"",""_dirIntensity"",""_mtime"",""_xtime""];" \n
       "_time = time + _zeit;" \n
       "if (typename _Center == typename """") then {_Pos = getMarkerpos _Center} else {_Pos = getPos _Center};" \n
       "if (_wind) then {_right = (wind select 0) * _windstrength;_forward = (wind select 1) * _windstrength} else {_right = _right2;_forward = _forward2};" \n
       "if ((daytime > _mtime) && (daytime < _xtime)) then {" \n
       "for [{_x=1},{_x<=_dichte},{_x=_x+1}] do {" \n
       "_radius= _mdistanz + random (_xdistanz - _mdistanz);" \n
       "_CC = [_col1,_col2,_col3,.3*_transparency];" \n
       "_size = _msize + random (_xsize - _msize);" \n
       "_randomdir = random 360;" \n
       "_lifetime = _mlifetime + random (_xlifetime - _mlifetime);" \n
       "drop [""\A3\data_f\cl_basic"","""",""Billboard"",_spawn, _lifetime,[(_Pos select 0)+_radius*sin _randomdir,(_Pos select 1)+_radius*cos _randomdir,_height],[_right,_forward,_up],5,0.2,0.1568,0,[_size],[[_col1,_col2,_col3,0],_CC,_CC,_CC,_CC,_CC,_CC,[_col1,_col2,_col3,0]],[0],_dirPeroid,_dirIntensity,"""", """",""""];" \n 
       "};" \n
       "} else { " \n
       "_time = time + 5;" \n
       "};";
      precondition = "";
      class Links
      {
        class if_object
        {
          priority = 0.000000;
          to="dummy";
          precondition = "";
          condition="!(typename _Center == typename """")";
          action="";
        };
        class if_marker
        {
          priority = 0.000000;
          to="dummy_1";
          precondition = "";
          condition="typename _Center == typename """"";
          action="";
        };
      };
    };
    class End
    {
      name = "End";
      init = "";
      precondition = "";
      class Links
      {
      };
    };
    class dummy
    {
      name = "dummy";
      init = "";
      precondition = "";
      class Links
      {
        class wait
        {
          priority = 0.000000;
          to="Fog";
          precondition = "";
          condition="time > _time";
          action="";
        };
        class if_object_or_unit
        {
          priority = 0.000000;
          to="End";
          precondition = "";
          condition="!(alive _Center)";
          action="";
        };
      };
    };
    class dummy_1
    {
      name = "dummy_1";
      init = "";
      precondition = "";
      class Links
      {
        class wait
        {
          priority = 0.000000;
          to="Fog";
          precondition = "";
          condition="time > _time";
          action="";
        };
        class if_marker_not_ex
        {
          priority = 0.000000;
          to="End";
          precondition = "";
          condition="((getMarkerPos _Center select 0) == 0) && ((getMarkerPos _Center select 1) == 0)";
          action="";
        };
      };
    };
  };
  initState="Start";
  finalStates[] =
  {
    "End",
  };
};

 

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, GEORGE FLOROS GR said:

Hello there Socs !

 

There is a similar script in the BMR Mission if i am right.

 

Yup, that's the same one AZCoder posted.

  • Like 1

Share this post


Link to post
Share on other sites
9 minutes ago, Evil Organ said:

I'd also recommend Harzach's choice too, I used it in a mission a while back...

 

Nice script !

  • Like 1

Share this post


Link to post
Share on other sites

That reminds that I haven't done a ground fog effect in a mission in years. I will try the one Harzach posted, probably easier to implement than the old A2 one.

 

  • Like 2

Share this post


Link to post
Share on other sites

TBH I haven't tried either of them, I probably should give them both a go!

  • Like 2

Share this post


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

That reminds that I haven't done a ground fog effect in a mission in years. I will try the one Harzach posted, probably easier to implement than the old A2 one.

 

1 hour ago, Harzach said:

TBH I haven't tried either of them, I probably should give them both a go!

 

... I will be waiting for the results !!!    :ftvsmilie2:

  • Haha 2

Share this post


Link to post
Share on other sites
2 hours ago, Harzach said:

TBH I haven't tried either of them, I probably should give them both a go!

By the way, since you usually always have an answer at the ready for me, lol, do you know how to force the ramp on the MK10 Landing Craft Utility to open upon beaching? I can't find the name of it to set it as a trigger so do you know if there's any other way to force open it? Because the units don't get out if the ramp isn't open... This is for a world war 2 scenario... Any help or suggestion are appreciated.. Thanks :D

Share this post


Link to post
Share on other sites
6 minutes ago, socs said:

MK10 Landing Craft Utility

What mod?

Share this post


Link to post
Share on other sites
_unit animate ["FrontRamp",1]; _unit animate ["FrontRampRubber",-0.7];

"_unit" is a placeholder, of course. Reset those values to "0" to raise the ramp.

Share this post


Link to post
Share on other sites
3 minutes ago, Harzach said:

_unit animate ["FrontRamp",1]; _unit animate ["FrontRampRubber",-0.7];

"_unit" is a placeholder, of course. Reset those values to "0" to raise the ramp.

So which one is for which? Is it in the condescending order that I have it listed or is it for the same vehicle?

Share this post


Link to post
Share on other sites

That code works for the Burnes Armory LCU. If FFAA uses the Burnes LCU, then it will work for that one too.

  • Like 1

Share this post


Link to post
Share on other sites

Sweet, that's real helpful! Thanks a bunch!

Share this post


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

That code works for the Burnes Armory LCU. If FFAA uses the Burnes LCU, then it will work for that one too.

Does this apply with the rear ramp too? Only asking because the troops tend to get stuck when disembarking until you let them out in the back...


Update: I was smart enough to try it myself lol, no need to respond... Thanks a bunch!

Share this post


Link to post
Share on other sites
11 minutes ago, socs said:

Does this apply with the rear ramp too? Only asking because the troops tend to get stuck when disembarking until you let them out in the back...

Just use the first part, and change the class to "rearRamp."

Share this post


Link to post
Share on other sites
Just now, Harzach said:

Just use the first part, and change the class to "rearRamp."

Lol yeah I was smart enough to think of that surprisingly... Thank you once again!

  • Like 1

Share this post


Link to post
Share on other sites

Hey, the "Fog script v1.62 Made by Rockhount[BAfH]" works great, but how to deactivate it?
I try to implement this script in a trigger, but i don't know how to deactivate this script if i leave the trigger zone.
Thanks.

  • Like 1

Share this post


Link to post
Share on other sites

Give the trigger a name and deleteVehicle triggerName on it? That might throw an error in the fsm though, I would have to test it.

Share this post


Link to post
Share on other sites
19 hours ago, Koust said:

Hey, the "Fog script v1.62 Made by Rockhount[BAfH]" works great, but how to deactivate it?
I try to implement this script in a trigger, but i don't know how to deactivate this script if i leave the trigger zone.
Thanks.

I dont know why but the script dosent work for me somehow. does anyone know why? i dont get any errormsgs.

does it have to do with the ingame fog settings?

 

note: changed that also:

"drop [""\ca\data\cl_basic"","""",""Billboard"",_spawn,_l ifetime,[(_Pos select 0)+_radius*sin _randomdir,(_Pos select 1)+_radius*cos _randomdir,_height],[_right,_forward,_up],5,0.2,0.1568,0,[_size],[[_col1,_col2,_col3,0],_CC,_CC,_CC,_CC,_CC,_CC,[_col1,_col2,_col3,0]],[0],_dirPeroid,_dirIntensity,"""", """",""""];" \n

to

"drop [""\A3\data_f\cl_basic"","""",""Billboard"",_spawn, _lifetime,[(_Pos select 0)+_radius*sin _randomdir,(_Pos select 1)+_radius*cos _randomdir,_height],[_right,_forward,_up],5,0.2,0.1568,0,[_size],[[_col1,_col2,_col3,0],_CC,_CC,_CC,_CC,_CC,_CC,[_col1,_col2,_col3,0]],[0],_dirPeroid,_dirIntensity,"""", """",""""];" \n 

nvm. but i recommend you to use:

http://www.exilemod.com/topic/9995-creepy-night-fog-for-exile/

looks way better.

Edited by Alert23
solved
  • Like 1

Share this post


Link to post
Share on other sites

I'm at work ,but letter I'll share my fog script. I made/edited it so fog moves around but not local on player . It's server side ( if I remember correctly). 

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

ok, I cant credit the people that helped me, it may end up being all of you .. So Do As You Want With It.. (sharing is caring).

/*
 Created by Dr.Death JM 3.12.17
 z_fogernizer.sqf
*/
server_f = [];	
for "_i" from 0 to 1 do 
{
[] spawn 
	
 {

    _fogSpawnMarkers = ["fspawnfog"];
    _fogOb =  createVehicle ["D_Tree_4",[0,0,0],_fogSpawnMarkers,0 , "CAN_COLLIDE"];
    _fogPoS = position _fogOb;
	
	    _zFoger = "#particlesource" createVehicleLocal _fogPoS;
        _zFoger setParticleParams [
        ["\A3\Data_F\ParticleEffects\Universal\universal.p3d" ,
		16, 12, 13, 0],
		"",
		"Billboard",
		30,
		60, 
		[0, 0, -6],
		[0, 1.8, 0],
		1.200, 1.275, 1, 1.175,
		[7,6],
		[[1, 1, 1, 0], [1, 1, 1, 0.04], [1, 1, 1, 0.06]],
		[1],
		1,
		0,
		"",
		"",
		_fogOb
		];
        _zFoger setParticleRandom
		[
		60,
		[100, 100, 0.2],
		[0, 0, -0.1],
		1,
		0.45,
		[1, 1, 1, 0.04],
		0,
		0
		];
        _zFoger setParticleCircle
		[
		0.001,
		[0, 0, -0.12]
		];
        _zFoger setDropInterval
		0.01;
		
        server_f pushback _fogOb;
        publicVariable "server_f";
        server_f = server_f - [_fogOb];
        publicVariable "server_f";
		
   }; 
};	   

In the initPlayerLocal.sqf put

_Z = [] execVM "somefolder\z_fogernizer.sqf";

or

_Z = [] execVM "z_fogernizer.sqf";

in the mission sqm put a marker named "fspawnfog" EXAMPLE

		class Item45
		{
			dataType="Marker";
			position[]={2456.125,2.9812012,6146.375};
			name="fspawnfog";
			markerType="ELLIPSE";
			type="Empty";
			colorName="ColorGrey";
			alpha=0;
			fillName="Border";
			a=5;
			b=5;
			angle=223.40884;
			drawBorder=1;
			id=292;
			atlOffset=4.5537949e-005;
		};

you might want to tweek it, i used another code in initServer.sqf a code from cly's DM framework i was editing (learning) it was based on time of day as you see, its simple to add your own. 

if (CLY_swamp_timeOfDay == 2300) then
{
0 setFog [1, 1.9, 1.5+1.8];
}
else
{
0 setFog [1+1, 1.9+-0.499, 1.5+1.8];
};

you'll be surprised how well this really works, and if someone has good particle fx knowledge they can make this even better. 

  • Like 2
  • Thanks 1

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

×