Comrades in Arms Discussion Board
Sandstorm and weather - Printable Version

+- Comrades in Arms Discussion Board (http://forum.ciahome.net)
+-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3)
+--- Forum: Mission Making (http://forum.ciahome.net/forumdisplay.php?fid=8)
+--- Thread: Sandstorm and weather (/showthread.php?tid=1944)



Sandstorm and weather - Bubba - 12-12-2010

So problem this time is: How to create a sandstorm into my mission? The fog and weather are bad and not enough! And I even heard that the weather is not synced so It's unfair because someone might be having a storm and another ones raining Etc.

And by the amount of these questions you might make an assumption that I'm really trying to finish making this mission!


Re: another topic! (and a problem!) - Zwobot - 12-12-2010

You have to place the "Effects" module in the editor and set the correct weather and date parameters in the intel screen of the mission editor.

See here: http://community.bistudio.com/wiki/Environment_-_Effects


Re: Sandstorm/Altering Weather in Editor - TonyMarony - 12-12-2010

Hey lad,

you almost got it right, but making the topic "I have a problem" is not how to deal in forums, you know. When you create a topic, one might assume that you have a problem anyways. Mentioning the problem in the topic specifically makes things much more easy for others ;-).

Due to my natural born admin powers, i just changed the topic for you as i think it might be better.

For your storm problem: You might go into the EW campaign and chec there for some nice scripts. They are similar to the ones used in PMC campaign (although not the Storm-thingy, but you might get somewhat close with altering the code maybe?).

It is set in the init.sqf:

Code:
//--- Wind & Dust
[] spawn {
    waituntil {isplayer brown};
    setwind [0.201112,0.204166,true];
    while {true} do {
        _ran = ceil random 5;
        playsound format ["wind_%1",_ran];
        _obj = vehicle player;
        _pos = position _obj;

        //--- Dust
            setwind [0.201112*2,0.204166*2,false];
        _velocity = [random 10,random 10,-1];
        _color = [1.0, 0.9, 0.8];
        _alpha = 0.02 + random 0.02;
        _ps = "#particlesource" createVehicleLocal _pos; 
        _ps setParticleParams [["\Ca\Data\ParticleEffects\Universal\universal.p3d", 16, 12, 8], "", "Billboard", 1, 3, [0, 0, -6], _velocity, 1, 1.275, 1, 0, [9], [_color + [0], _color + [_alpha], _color + [0]], [1000], 1, 0, "", "", _obj];
        _ps setParticleRandom [3, [30, 30, 0], [0, 0, 0], 1, 0, [0, 0, 0, 0.01], 0, 0];
        _ps setParticleCircle [0.1, [0, 0, 0]];
        _ps setDropInterval 0.01;

        sleep (random 1);
        deletevehicle _ps;
        _delay = 10 + random 20;
        sleep _delay;

    };
};

Personally i dont really know what this thing is doing in every line, but it creates the random dust clouds and wind noise afaik. Maybe someone script-skilled can make a storm out of this?

Cheers

  Tony



Re: Sandstorm and weather - TonyMarony - 02-25-2011

Hola,

just to keep it complete: Since PMC we have a sandstorm function.

to be able to use it, place a Module on the Map with "Function" and add to the init.sqf

Code:
[player,-1,0.8,true] call bis_fnc_sandstorm;

See also th BIKI: http://community.bistudio.com/wiki/BIS_fnc_sandstorm

As always when using functions, you should add a line that makes sure, that the function manager has finished initializing. Add therefore the line

Code:
waituntil {!isnil "bis_fnc_init"};

to the top of your init file. You have to add this line only once for a mission.

Cheers

 Tony

ED: a further question might be, how to alter the line to make the storm more dense or more weak? Anyone knowsabout=1???