Jump to content
m0nkey

MKY Blizzard and Snow script

Recommended Posts

 I noticed the AI were not targeting me, as if they were affected by the particles. 

 

Did you try it on SP or prevriew mode ? My understanding (and I can be completly wrong) is that it's just a locality problem. If you're in SP or preview mode in the editor, the same process is both the server and the client. The particle effects are generated on the client but the server is also affected by those particles as everything (player, AI and particles) are managed by the same process on your PC.

If you host a dedi on your PC (and if I'm right) and add AIs through the editor (so AIs are managed by the server), the AIs will not be affected by particles that are local to your client.

Share this post


Link to post
Share on other sites

m0nkey, can you please consider writing up a module for use in the editor?

Share this post


Link to post
Share on other sites

@1212pdmcdmppm 

 

I see what you mean. This is a dynamic mission, everything except the 8 playable units is created on the fly. I don't create many missions that I can't play because I know everything thats going to happen ;) But, I see your point. When I get my changes made and bugs worked out, I will put it on a dedi and find out.

 

@Pulstar

 

I've been looking at the addon perspective. I think that it can be done, I am just not to that point. The sound issue must be resolved first. And while I am creating these effects I still want to finish up my dust version. So, if its possible I will, but the sound issue is the killer IMO. I just haven't found anything/anyone to show me how to create a "sound vehicle" yet. :)

 

Share this post


Link to post
Share on other sites

@ monkey

 

I like the direction your heading with the snow script, but like many that are testing are not scripters and find it a bit difficult to implement the script to missions. I agree with Pulstar that a module would alleviate majority of the issues in adding your script to any mission created.

And dude, awesome job as always! keep up the great work your doing!

Share this post


Link to post
Share on other sites

@FTWxxxPHOENIX

 

I am afraid its not that easy. I have been integrating it into different missions and to be honest, I've had to change code in the mission and in my script every time. The effect works and remains the same, but there are many different things that can go wrong with the "package". For example, if you initiate the snow script while in a heli, two things happen. First, the fog will, after 30 seconds, be very dense below you. Its by design but on foot or in a truck, you don't decend that much that fast. I could reduce the timing, but you would see the transition more, I could remove it but it creates a neat effect. So, I have to change things. Second, for some reason, the stupid attachTo command frequently fails to work properly. Or update properly, or something. Basically, there is an object attached to your player unit, and the snow uses that as its "base", not the player really (its how I get certain effects to happen). Anyway what you end up seeing is the snow effects get stuck somewhere and only when you die does it get repositioned properly. It only seems to happen in vehicles, and not always.

 

Will have to see how it develops after I get the dust one finished. All this integrating was needed to really see what shortcomings there would be. Its much more complicated than it should be, but thats par for course with me I suppose.

Share this post


Link to post
Share on other sites

Will eagerly test it. Was thinking about adding snow to my weather mod, but due to the nature of hoax snow scripting, I didn't. Yet?

We definitely need (vanilla ArmA) snow. For Namalsk, Chernarus winter...

Share this post


Link to post
Share on other sites

Hey Monkey,
 
I've managed to install the snow script for my missions without any problems, however no matter what I've tried, I cannot find a way to change the amount of snowfall that you have listed in the MKY_Snow_Client.sqf under:

MKY_fnc_set_Drop_Intervals = {
	// _this: 0 - "type of snow"
	private ["_arEmitters","_arDropMax","_intStart"];

	switch (_this select 0) do {
		case "flurry": {_arEmitters = arFlurry_Emitters;_arDropMax = arFlurry_Drop_Max;};
		case "light": {_arEmitters = arLight_Emitters;_arDropMax = arLight_Drop_Max;};
		case "blizzard": {_arEmitters = arBlizzard_Emitters;_arDropMax = arBlizzard_Drop_Max;};
		case "whiteout": {_arEmitters = arWhiteout_Emitters;_arDropMax = arWhiteout_Drop_Max;};
	};
hint format ["changing snow -- %1 -- %2",(_this select 0),random(99)];
	if !(arCurrent_Emitters isEqualTo _arEmitters) then {
		{
			_x setDropInterval (_arDropMax select _forEachIndex);
		} forEach _arEmitters;
		sleep 3;
		// stop the current (old) effect
		{_x setDropInterval 0.0;sleep 1;} forEach arCurrent_Emitters;
		// set the global variable to the new current emitters
		arCurrent_Emitters = _arEmitters;
	};
	(true);
};

I've also messed around with the various variables in the "0 = [[0.23,0.047,15],0.8,true] execVM "MKY\snow\MKY_Snow_Client.sqf";"  with no avail.   Any chance you can drop me a quick line and help?  How can I control which gets applied:  "flurry, light, blizzard, whiteout"?

 

Thank you and loving the script!

Share this post


Link to post
Share on other sites

Check your pm @general. Seen the youtube comment as well. I messed with latest version last night, looking for last minute bugs. hope to release that (which is part of my heavily modified All Out Warfare version) very soon. 

Share this post


Link to post
Share on other sites

My goal is by the end of this weekend. We will see if that happens :)

Share this post


Link to post
Share on other sites

Okay, I uploaded two missions to my steam profile or whatever, workshop thing..., one on Takistan for the sand and one on Abramia for the snow. Missions are the same, just a couple squads to shoot at while the snow/sand comes down.

 

The snow and sand scripts are both in each mission. The init.sqf is very basic (no parameter array stuff this time). Read the script files, I commented much of it. I don't believe I have released this version yet, so it should be fairly different in syntax from the previous ones. I am not even sure I was done with it to be honest. I just don't have the time right now to dig into it and refresh my memory. That will have to wait till late summer.

 

But, they both worked, so its going to have to do for now. Besides, in my limited time testing I already have a better vision of a sand effect. I really don't play this game at all, I just code. Ha.

 

Enjoy.

  • Like 2

Share this post


Link to post
Share on other sites

Hey Great Script but how can i control which snow gets applied, flurry, light, blizzard, whiteout?

 

THX

Share this post


Link to post
Share on other sites

Latest version is 100. It has both sand and snow. Its on my steam workshop. Nomenclature for whiteout etc has changed to simply "light,moderate,heavy".

 

I made a very simple mission as an example. De-pbo the mission and look at the init.sqf file for use. I commented things quite a bit. If you still have questions after that, glad to help. You can also look at my older versions as I commented those quite a bit as well, but have done so much scripting on both these EFX and so many others that I don't really remember off-hand the exact syntax.

Share this post


Link to post
Share on other sites

Thanks for your answer, if im correct when im editing the number in this line in the init.sqf

 

nul = [3,true] execVM "MKY\MKY_Sand_Snow_Init.sqf";

 

I can decide which snow gets applied ?

Share this post


Link to post
Share on other sites

I looked for KKs method and could not find how he did it. Never told anyone that I could find. I have glanced at a few ways others have mentioned, but haven't cooked anything up yet myself. I am almost done with the script portion. I am actually about done with a test mission that will apply to all snow maps, a couple extra scripts, etc etc. The main script project works well so far. I hope for the next beta release next week.

 

After I get that out so others can test and give feedback, I will look at finishing the addon portion. Then I will look at the feasability of snow not being inside buildings. I got hung up in finding all the snow maps available at armaholic. Good news is that I have found 16, and I have a mod load sequence that works with all of them, although one of them you have to choose a version to use so its really only 15.

 

Any progress on NOT snowing in buildings?

Share this post


Link to post
Share on other sites

Thanks for your answer, if im correct when im editing the number in this line in the init.sqf

 

nul = [3,true] execVM "MKY\MKY_Sand_Snow_Init.sqf";

 

I can decide which snow gets applied ?

Roger that. 3 is the level of snow. If you use the boolean "true" as the second parameter, then it will not vary. The strength of the effect then can be controlled by the scripter if so desired. IF you will note in MKY_Snow_Client.sqf, around line 260, that the "heavy" effect will use by default a dropInterval of 0.03.

 

As the MKY_Snow_Server.sqf script runs, it would choose a random value (around line 79 in that file) UNLESS you set that 2nd parameter to true. And I will state the obvious that it does not choose a random value to vary the effect, but stays at 0.03 indefinately.

 

You might also note at the bottom of MKY_Snow_Server.sqf I have commented that the global variable "varSnowData" can be used to change the snow effect. A server could set this then publicize it, or the client could do it. There are a few different global variables you can modify if you really want to fine tune it.

 

Hope that gives you some fuel lol.

Share this post


Link to post
Share on other sites

Any progress on NOT snowing in buildings?

Unfortunately no. I looked quite deeply at every particle effect I could find, and the values/parameters of them. I could not find anything to use without some (possibly) really complicated stuff which I don't know how to do. Meaning, not billboard particles.

 

I am pretty sure that the character model clips the particles, and when in a vehicle, its a model when you are in it (at least as driver in a truck). As a passenger it might not be a "player model or character model, whatever its technically called". Anyway, I tried lots of things like placing models above the players position (such as in a building) that might "clip" the particles. I even tried creating a body of water like a pond X meter in size above the character, because the particles clip on surfaces like water. But that did not work.

 

I also tried using a circle emitter, in which to make the snow fall outside the model of the building in a circle. That would work, but the math was pretty tricky because the model spaces were so hit or miss (bounding boxes etc). I gave up on that because it was going to take forever to test it and I felt it would only be a partial solution (similar to particles moving properly with vehicles). There just aren't enough particles available to achieve certain effects, or if there are its just too many for many systems.

 

Killzone Kid has the only working example I have seen of it not allowing particles in building models. I PM'ed him but no reply, so I can assume he is still cooking something up and doesn't want to share it yet. I can't blame him for that, its what I would do too.

 

So, the short answer I guess is no. :)

Share this post


Link to post
Share on other sites

In the init.sqf, I would like to enable/disable parameters, but am a bit lost

If I wanted more fog and no rain, how would I change that here?

// snow - [[fog data],int Overcast,ppEfx,allow rain, vary fog, use audio]
MKY_arSnowEFX = [[0.23,0.047,15],0.8,true];

Share this post


Link to post
Share on other sites

Not sure if you're still actively developing this or not, but we've been trying to use it on our community missions. In these 40-50 player coop missions, we typically start at an airfield, climb into helicopters, and fly out to the AO to fight bad guys. The snow looks great at the airfield, but once we leave, the snow effect remains behind. Is there a way to get it to pick up again when players disembark the helicopter? Or a way to pause it from starting until later in the mission?

Share this post


Link to post
Share on other sites

 

 Trying to get the blizzard effect in a n already heavily scripted dynamic mission which wont pick it up in its init so im calling from the ingame debug console: varenablesnow = true;    0 = [[0.23,0.047,15],0.8,true] execVM "MKY\snow\MKY_Snow_Client.sqf";

 

 Which brings in the snow skies and flurries but cant for the life of me figure out how to manually create the Blizzard or Whiteout which is an awesome effect

 

Edit: Heres the parameter list from initial scripts:

 

_this:
    0 - array         - fog data                                             -- ie. [.3,.5,200] -- use 0 to ignore (can omit)
    1 - integer     - overcast                                          -- use "" to ignore (can omit)
    2 - boolean     - use ppEffects (default is false)                    -- (can omit)
    3 - boolean     - allow rain (default is false)                     -- (can omit)
    4 - boolean        - enforce wind dir/strength (default is true)         -- (can omit)
    5 - boolean     - vary fog effect (default is true)                    -- (can omit)
    6 - boolean        - use wind audio file (default is true)                -- (can omit)
    NOTE: omitting a value means you can stop there and not have to list the remaining parameters (defaults will be applied)

    EXAMPLES:
    0 = [[0.23,0.021,100],"",true] execVM "script.sqf"; // fog, no overcast change, use ppeffects, (no rain)
    0 = [0,.3,false,true] execVM "script.sqf"; // no fog, .3 overcast, do not use ppeffects, allow rain
    0 = [0,"",false,true,false] execVM "script.sqf"; // no fog, no overcast change, do not use ppeffects, allow rain, do not enforce wind
    0 = [] execVM "script.sqf"; // no fog, no overcast change, do not use ppeffects, no rain, enforced wind (direction & strength)

    NOTES:
    fog array values [overall fog density, amount of dissipation with altitude, altitude]
    using [0.25,0,5] will create a thick, low fog that does not dissipate - same from top to bottom
    using [0.25,1,5] will create a thick on bottom and hazy on top fog
    these values [0.23,0.021,60] will give a nice thick distance fog while allowing a few hundred yards of some visibility
    when allowed to vary the fog effect, this script will try to maintain the altitude of fog that you gave
    this means if you gave [.2,.1,10] that you would not see the fog most likely at 50m altitude (a hilltop)
    the snow effect is enhanced with some fog, so vary fog means to periodically reset its altitude to match the players

 

  • Like 1

Share this post


Link to post
Share on other sites

hi, ty for your work but... armaholic is down i change sdd and now cant reupload your mod anyone have ?

link are down.

ty

sy for my english.

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

×