Jump to content
m0nkey

MKY Sandstorm script

Recommended Posts

would love to see this eventually controllable over time....meaning stArting and stopping mid mission (even if its SP only)!!  :)  great job so far

Share this post


Link to post
Share on other sites

Hey guys can anyone assist?  I'm having trouble adding the snow effects to Chernarus Winter map.

 

init.sqf

MKY_arSnowEFX = [[0.23,0.021,60],"",true,false,true,true,true,3];
nul = [] execVM "MKY\MKY_Sand_Snow_Init.sqf";

** And I tried **

MKY_arSandEFX = [[0.23,0.021,60],"",true,false,true,true,true,3];
nul = [] execVM "MKY\MKY_Sand_Snow_Init.sqf";

Copied the MKY folder in the main mission folder as instructed.

 

I even tried moving adding "chernarus_winter" under the sand worlds in the MKY_fnc_getInfoWorld.sqf file.  Got the sand to work on the map, but when I move it back to snow, nothing.

 

Anyone able to provide some insight?

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Hi Guys,

Can someone please help, I have down loaded the example mission  and it work great, but when i try to use it in the  Eden editor i keep getting the following error message :-

 

Error Undefined variable in expression: paramsarray

file c:\Users\ Chris\Documents|Arma3\missions\MKY_Sand_v003.Shapur_BAF\init.sqf, line 64

 

 

I have not edited the test mission, all i have done is import it to the Eden 3D editor

 

Any ideas

 

Many Thanks

Share this post


Link to post
Share on other sites

Have not had any pc time for about a month really. Too busy.

 

@hammer

 

The error is saying that the variable "paramsArray" is not defined. The only reason it would not be defined is if the description.ext file is not existing. 

 

This can occur if you open a mission in editor and then save it. Editor saves missions in %userprofile%\arma3\mpmissions\mission_name.map_name. If it was not there or was renamed, it will NOT save anything except mission.sqm. My bet is all dependency files are missing from where it is located. Put those files in that directory, and all should work.

 

@thegeneral

 

From the shapur_003 files, there is no snow, only sand. I have a new snow that does not require wind changes. . I think the last version of snow was MKY_sand_snow.thirskw. Syntax might be slightly different as I cannot recall whether sand or snow introduced the current syntax first... I will endeavor to release the latest versions soon. But I have to refresh myself with what I was last doing, its been so long...

  • Like 2

Share this post


Link to post
Share on other sites

Hi Guys,

Can someone please help, I have down loaded the example mission  and it work great, but when i try to use it in the  Eden editor i keep getting the following error message :-

 

Error Undefined variable in expression: paramsarray

file c:\Users\ Chris\Documents|Arma3\missions\MKY_Sand_v003.Shapur_BAF\init.sqf, line 64

 

 

I have not edited the test mission, all i have done is import it to the Eden 3D editor

 

Any ideas

 

Many Thanks

I am having the same error message, except Hammer says his works great, but when I enter the tigger areas nothing happens. I did as you (m0nkey) instructed and copied all of the files over into the temporary file that gets created when opening a mission with Eden (the one that starts with the little ~ symbol), but it is still giving me the error. I also tried saving the scenario under a different mission name and copying over all of the files but that did not work either.

I apologize I am not intelligent enough to figure out what else to try, but for now I am unable to test this unfortunately or learn from the example mission how to adapt it to my own mission. If you have some time to explain how to fix this error in terms a complete idiot like myself can understand I would appreciate it.

Share this post


Link to post
Share on other sites

I am having the same error message, except Hammer says his works great, but when I enter the tigger areas nothing happens. I did as you (m0nkey) instructed and copied all of the files over into the temporary file that gets created when opening a mission with Eden (the one that starts with the little ~ symbol), but it is still giving me the error. I also tried saving the scenario under a different mission name and copying over all of the files but that did not work either.

I apologize I am not intelligent enough to figure out what else to try, but for now I am unable to test this unfortunately or learn from the example mission how to adapt it to my own mission. If you have some time to explain how to fix this error in terms a complete idiot like myself can understand I would appreciate it.

 

Here is a link to the script files.

https://app.box.com/s/29x5lllol4wxs6j610rhpl1m1n89cvnv

 

I personally de-pbo missions with mikero tools. I don't like how the editor can muck things up, so I do it manually. If I am going to edit something, I de-pbo, rename directory, and place it in mpmissions (userprofile, not game root). Then I can edit it without issue, and all files are in place. If I saveas, it only copies the mission.sqm, so I must copy the files from the original mission directory into the "new copy" directory. Thus, I find it easier to do it myself.

 

Anyway, this script is pretty simple to get working. If you look in that zip file, you will see what is needed in the init.sqf.

 

Define 2 global arrays the script will use.

Exec a script to get world data..

Wait for the script to finish, which exposes a global variable.

Define your desired EFX settings in an array (one for snow, one for sand).

Initialize the EFX.

 

I do include audio, so note in the description.ext file the use of CfgMusic. Some have stated music might not be the best method, but I have not had time to change it and I cannot remember now why I switched to music anyway.

 

The only other thing you "should" do is look at is the MKY_fnc_getInfoWorld.sqf file. In it I define what worlds get snow or sand. Other than that, it should just work. There are of course things you can micro-manage, but that should all be in the comments in the files. I guess as a script (and me using and creating scripts) I always read them, and always like commented code so that I can understand (or remember haha) what is going on and what options are. Regular text files or readme's usually confuse me.. I like the really geeky stuff for some reason.

 

I am happy to provide more info if needed.

Share this post


Link to post
Share on other sites

Thanks, I'll have a look through all of that. I think maybe I had the wrong version. I was using v003, but I see the script files you've linked are version v100. Perhaps that was the issue, I'm not sure. I downloaded from Armaholic a couple months ago, but it appears v003 is the most recent version they have. I should have checked here first.

  • Like 1

Share this post


Link to post
Share on other sites

Very weird. I downloaded the v003 from armaholic. I extracted it and then cut/pasted it to

C:\Users\mky\Documents\Arma 3 - Other Profiles\m0nkey\MPMissions\MKY_Sand_v00333.Shapur_BAF

 

I then opened arma, went to multiplayer, clicked <<new 3d editor>>, then clicked open, highlighted the v00333 directory and clicked import. I then previewed the mission (in eden editor) and it worked just fine.

 

I cannot say why you two have that error.

 

And in fairness to yourself, I just put that new version up yesterday because of the issues reported in this thread. I might have been premature in that, time will tell. But I don't think the syntax and structure are going to change any time soon, so might as well adopt it if you like the EFX it gives :)

Share this post


Link to post
Share on other sites

Ahh, perhaps because I do not use the multiplayer editor I am encountering issues. I was looking to use this for a single player mission(s) and opened it in the regular editor, not the multiplayer one (I think there is a difference, not sure, I have never used the multiplayer editor but I always see the option when I open multiplayer).

Share this post


Link to post
Share on other sites

My script should work in SP as well. I have tried it in the past, cannot remember if I did with this v100 or not. If it does not, its a very small thing to fix it so that it will I am sure.

 

I almost always use MP because I only do coop really. And I rarely use the editor, its almost all scripting for me.

  • Like 1

Share this post


Link to post
Share on other sites

Does this script work on dedicated servers?

Share this post


Link to post
Share on other sites

Does this script work on dedicated servers?

Stu, read the post right before yours.

 

 

My script should work in SP as well. I have tried it in the past, cannot remember if I did with this v100 or not. If it does not, its a very small thing to fix it so that it will I am sure.

 

I almost always use MP because I only do coop really. And I rarely use the editor, its almost all scripting for me.

Share this post


Link to post
Share on other sites

The test mission does not work. I walked into the trigger zone and nothing except the "hint message" happens.

Share this post


Link to post
Share on other sites

hello guys i now feel like i never ever even played arma as i got zero idea what to do. can somebody give me step by step how to get the script to some map? (i got so far that i for example, launched Takistan>Saved the mission so its in files>and when i just tried to launch the mission thne it showed the error about the Init.sqf line 64

 

Edit. nvm i downloaded the V100 and it suddenly works :D

Share this post


Link to post
Share on other sites

Oh no, topic starter and script creator has last visit the forum at june 2016.

How to resolve issues?

Share this post


Link to post
Share on other sites

Monkey have take a lot of time to document his script... Everything is explained in the files !!

If the script doesn't work on a map, you should go to the MKY folder, then fnc, and edit MKY_fnc_getInfoWorld.sqf.
If your map isn't inside this array :

Quote

// modify as needed, just remember to lowercase all values
if (isNil "varSandWorlds") then {
    varSandWorlds = ["mountains_acr","shapur_baf","takistan","zargabad","bmfayshkhabur","clafghan","fata","mcn_aliabad","mske","smd_sahrani_a3","pja306","tup_qom","queshkibrul","razani"];
};

 

then add her. For kholm map, this become :

 

Quote

// modify as needed, just remember to lowercase all values
if (isNil "varSandWorlds") then {
    varSandWorlds = ["kholm","mountains_acr","shapur_baf","takistan","zargabad","bmfayshkhabur","clafghan","fata","mcn_aliabad","mske","smd_sahrani_a3","pja306","tup_qom","queshkibrul","razani"];
};

 

if you're in a snow map, you make this in the varSnowWorld array.

 

As commented by Monkey, think to lowercase the map name, and think to use the mapname used by arma:
You save you're mission in editor, and look at his name in the folder. for kholm this is

mygreatmission.kholm

 

but for mogadishu this is :

mygreatmission.mog

 

so you need to add mog, to the array, not mogadishu.

 

If you work on a simple solo mission, where you want a constant sand/ or snow value, you can just add this to the init.sqf :

Quote

    MKY_arSandEFX = [];
    nul = [] execVM "MKY\MKY_Sand_Snow_Init.sqf";

And you will have a random effect.

 

but you can play with the array, like this

Quote

MKY_arSandEFX = [[0.23,0.021,100],"",true,false,true,true,true,3]

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

 

You can read the MKY_Sand.txt tha's inside the example mission for understand how all of this work. And you can read every file and find tweak commented.

You need to use the Description.ext, obviously,

 

and another thing to know :

 

if you activate the sound inside the array, you will not have music (if im remembering right) cause this use the same engine inside the game.

Im asking to all of you one thing...
Pray that the Great Monkey come back one day \o/

  • Like 1

Share this post


Link to post
Share on other sites

From my very limited ability to read code it looks like the script sets the wind direction/speed.

 

I would like to use this on a persistent ALiVE mission which has changeable weather so I'd rather the script react to the weather in the mission rather than setting it's own wind values.

Does anyone know how I would go about making the script work off the in game weather?

 

 

Share this post


Link to post
Share on other sites

Did you have give a try to set the "force wind" params to false in the init.sqf array, and see what happened?

Im not sure to understand how the force wind works, (im not a scripter) but i think that the script will maybe follow the in-game wind, who will be drived by you're weather script....
Not sure :/

And can't test at the moment.

 

Intel :

in Sand_server

Quote

// server needs to find a bearing for the wind
MKY_fnc_getWind = {
    private ["_arBearing","_arSigns","_intWindIndex"];
    // array of cardinal bearings
    _arBearing = [45,135,225,315];
    // array of signed integers for wind (in order of bearings array)
    _arSigns = [[-1,-1],[-1,1],[1,1],[1,-1]];
    // get a wind index value
    _intWindIndex = floor (random (4));
    // set the global/public bearing variable indices
    MKY_arWind set [0,(_arBearing select _intWindIndex)];
    MKY_arWind set [1,(_arSigns select _intWindIndex)];
    (true);
};

 

in Sand_Client

Quote

arCurrent_Wind = [((MKY_arWind select 1) select 0) * windVal,((MKY_arWind select 1) select 1) * windVal,true];// global array - holds current wind values for setWind

 

Share this post


Link to post
Share on other sites

Yeah with my limited knowledge that seems to select a random bearing for the wind, or am I wrong and it's getting the wind then converting it to a bearing? 

Share this post


Link to post
Share on other sites

hey mky, i can't get the script working. i'm importing everything except for the mission.sqm, every time i play the mission its supposed to play in it doesn't work. all i want is the Brownout effect, not the dust storm, just the brownout. and it won't do anything.do you know how to fix this?

Share this post


Link to post
Share on other sites

where is the current script for the brownout effect? if it's there what do i need to do for it to work?

Share this post


Link to post
Share on other sites

I've only recently began turning my computer on. lol, I don't recall everything that I did as of yet.

 

I'm not even sure if it works yet, as there have been a lot of changes. Last version of the game I recall using was 1.56 or something.

 

I documented it all, that much I remember. It is scripting, so you have to actually follow the directions.

 

I would love to make it an addon but I never got to that point, and now I have to start over to a degree.

 

After I figure out why my favorite coop mission is giving errors with Zenophon's coop framework, I will incorporate my snow/sand into it and I will find out if it works.

 

I have also seen a few other snow scripts I will check out. All of these can be CPU intensive, maybe someone figured out a better algorithm.

 

The real problem with these effects is that if you travel fast enough, you can travel out of the effect and you have to wait for it to catch up.

  • Like 1

Share this post


Link to post
Share on other sites
33 minutes ago, m0nkey said:

All of these can be CPU intensive

:yeahthat:...my Winter mini-campaign knows EXACTLY what you're talking about.

  • Haha 1

Share this post


Link to post
Share on other sites

Is this due to the particles or just too many loops and activities?

I went out of my way to code things in the most effective way possible, and it helps a lot. But particles, well, you have to use them carefully. That's a lot of objects lol.

 

I've thought that Arma doesn't seem to use gpu as well. Maybe it's just me. Seems more cpu dependent to me.

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

×