Adding snow to your server

You would need to call fnc_isinsidebuilding and if it comes back true then disable the effect, and restart it when it is false again.

This sounds like it could be an aggressive server straining loop so it would probably be better off just ignoring the fact and assuming that the roof has a hole in it.
 
Anyone ever get this integrated into the dynamic weather?

I too would like to know this. I have it installed on my server, and I have adjusted my dynamic weather script to hopefully reflect a more realistic weather, instead of being clear sky why it is snowing.

I have also noticed it snows through my buildings that I have built with Base Building, not sure if this is the same for native server buildings.
 
Excellent. Thanks for picking up the slack there m1lkm8n!!! It appears that writing scripts at 2am isn't the best idea. I've made the temperature adjustments, as I've written warm clothes and Icewindo's hazmats as some what protections against snow.

If milkman gets the public variable I ballsed up working then checking for "snow" is very easy.
So at the top of the temperature page you will see a bunch of weather factors.
Add _snow_factor like this: (Note this is 1.7.5 celle so the variables will be different in your files!)
Add another local variable _is_snowing to track if it's snowing or not. You can use the public variable but I prefer to keep it simple.
Code:
//negative effects
_snow_factor=-20; //[I]Add snow variable[/I]
_water_factor=-50;//Cold water is cold!
_rain_factor        =-10;//In Building, Hazmat & /or Vehicle : 0
_night_factor=-5;
_wind_factor        =-3;//In Building or Vehicle : 0
//    _chill_factor        =  0;  Future Variable

_difference= 0;
_hasfireffect= false;
_isinbuilding= false;
_isinvehicle= false;


_is_snowing  = if (Snowstorm) then {_is_snowing = true} else {_is_snowing = false};
_raining= if(rain > 0) then {true} else {false};
_sunrise= call world_sunRise;

So you now have a snow factor and a variable to track snow.

Adding the factor into the temperature equation is very, very simple.

You'll see in the positive effects there's a variable called _difference , Your temperature gauge is changed according to this number every minute. The bigger difference, the faster your temperature drops or rises.

Anyway go half way down the page to //negative effects and add this to check factor in snow.

Code:
//NEGATIVE  EFFECTS

//Snow
if (_is_snowing) then {
_difference = _difference + _snow_factor;
};
//You'll know it's in the right place if this is below:
//water
if(surfaceIsWater getPosATL player || dayz_isSwimming) then {
_difference = _difference + _water_factor;
};

If it's snowing it'll effect your temperature


How did you add warm clothes to your server?
 
Back
Top