Jump to content

[Release] Snowstorm and random snow. heyhoho :)


GaspArt

Recommended Posts

Heyho, guys. Today is second day of winter and I thought, that will be cool make a random snow after restart and snowy weather.

 

Before we ll intsall scripts, I want say thanks to:
 

Halv - for WeedSpawn script and
Anonymous - for Snowstorm

 

http://www.youtube.com/watch?v=yvBQsg4LYUE

So, installing:
1. Extract RAR archive and place it in mission folder.
2. Open init.sqf and make some edits:
         2.1. Comment dynamic weather:
 

//execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf";

         2.2.Between "if (!isDedicated) then {" and "};" paste path to snowflakes.sqf , like that:
 

if (!isDedicated) then {
		execVM "YOURPATH\snowflakes.sqf";
};

         2.3. And after "};" paste path to snow.sqf . Finally must be like that:

if (!isDedicated) then {
		execVM "YOURPATH\snowflakes.sqf";
};
[] execVM "YOURPATH\snow.sqf";

3. Configure snow.sqf to set amount of snow objects on map and etc.

 

Download: Link

4. For Infistar users:


If u want to make markers in Admin tool for snow objects, take this codes:

Action:
 

		adminadd = adminadd + ["  Map Snow Markers",adminsnow,"1","0","0","0",[]];

Function:
 

	adminsnow =
	{
		if !(('ItemGPS' in items player) || ('ItemMap' in items player)) then
		{
			_config = ["ItemGPS"];
			_isOK = [player,_config] call BIS_fnc_invAdd;
		};
		
		adminsnows =
		{
			while {marksnow == 1} do
			{
				_objects = [];
				{
					_objects = _objects + (allMissionObjects _x);
					uiSleep 0.5;
				} forEach ["MAP_snow"];
				for "_i" from 0 to (count _objects)-1 do
				{
					_selected = _objects select _i;
					deleteMarkerLocal ("adminsnows" + (str _i));
					_vm = createMarkerLocal [("adminsnows" + (str _i)), getPos _selected];
					_vm setMarkerTypeLocal "Destroy";
					_vm setMarkerSizeLocal [0.8, 0.8];
					_vm setMarkerTextLocal format[" %1", getText (configFile >> 'CfgVehicles' >> (typeOf _selected) >> 'displayName')];
					_vm setMarkerColorLocal ("ColorRed");
				};
				uiSleep 20;
			};
			for "_i" from 0 to 8888 do {deleteMarkerLocal ("adminsnows" + (str _i));};
		};
		if (isNil "marksnow") then {marksnow = 0;};
		if (marksnow == 0) then
		{
			marksnow = 1;
			hint "2D Map Snow Markers Activated";
			[] spawn adminsnows;
			
			_sl = format["%1 SnowMarker Activated",name player];
			PVAH_WriteLogReq = [player,toArray _sl];
			publicVariableServer 'PVAH_WriteLogReq';
		}
		else
		{
			marksnow = 0;
			hint "2D Map Snow Markers Disabled";
			
			for "_i" from 0 to 8888 do {deleteMarkerLocal ("adminsnows" + (str _i));};
			
			_sl = format["%1 SnowMarker Disabled",name player];
			PVAH_WriteLogReq = [player,toArray _sl];
			publicVariableServer 'PVAH_WriteLogReq';
		};
	};



P.S. Somebody can say how to change native temperture? So players with script should use heatpacks and campfires for warm.

Link to comment
Share on other sites

I fail to see why the weed farm is included (we use weed farms on our server)? Am I missing something...? Are you using it to spawn the snow?

 

Thanks for the script, looking forward to implementing some christmas spirit on our server later in December. :-)

I use just generator script. Only that. Later will try to make it in server.pbo side

Link to comment
Share on other sites

People are losing a lot of FPS due to the snow(snow particles, not the stuff on the ground).
I tried changing the density from 20k to 1k but that didn't do much. Any tips?

 

Any way to integrate this into the DynamicWeatherSystem.sqf ?

Link to comment
Share on other sites

People are losing a lot of FPS due to the snow(snow particles, not the stuff on the ground).

I tried changing the density from 20k to 1k but that didn't do much. Any tips?

 

Any way to integrate this into the DynamicWeatherSystem.sqf ?

Yeah. I hope that admins willnt kill me for link on opendayz... 

http://opendayz.net/threads/tutorial-snow-added-to-dynamic-weather.15294/

Link to comment
Share on other sites

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
  • Advertisement
  • Discord

×
×
  • Create New...