Jump to content
Sign in to follow this  
cobra5150

Is there a way to create dust.

Recommended Posts

can i trigger a dust cloud, or is there a script out there for this??

Share this post


Link to post
Share on other sites

If you're not talking about a huge dust storm, here's how to make a tiny puff of dust:

_unit = _this select 0;
_particle = "\ca\data\Cl_basic.p3d";

drop [_particle,"","Billboard",100,1,[(getPos _unit) select 0,(getPos _unit) select 1,0.2],[0,0,0],10,25.5,20,0.14,[0.4,1.0],[[0.8,0.6,0.3,1],[0.8,0.6,0.4,1],[0.9,0.7,0.4,1],[0.8,0.7,0,0]],[0,1,0,1],0,0,"","",""];

Share this post


Link to post
Share on other sites

I need a puff like a crate hitting the ground. How do I call your script Kylandia??? I put it in a trigger and it wont let me due to syntax??? do I need to plug in my units name or something??

Share this post


Link to post
Share on other sites

I'm looking for a huge sandstorm!

I need it for the mission I'm making which will have sandstorm's at random times during the mission. If anyone can help that would be great!

I've tried the NIM Weather add-on but you can customize it.... I really want a sandstorm to where you can't see further then 50m.

Thanks in advance!

-Bigshot

Share this post


Link to post
Share on other sites

Bigshot, Riouken's function will work for what you want. Read the biki. :)

Cobra, try this. Needs a scale change, but that's basically it.

Share this post


Link to post
Share on other sites

Silly me not reading the earlier posts more thoroughly! :blush:

EDIT: The BIS Sandstorm function will not do... It's just like a little dust flying by, I want a full on dust storm to engulf the player limiting his visibility. I want to stay away from NIM Weather due to its lack of customization. If anyone can help that would be great!

-Bigshot

Edited by bigshotking

Share this post


Link to post
Share on other sites

I saw no sandstorm....

I unpboed it and looked what was going on and flew over there and nothing was going on its regular area

Any other suggestions?

Share this post


Link to post
Share on other sites

I meant to open the PBO and inspect the scripts where you'd find this:

// by psycho
//sanddustscript for evo-oa
private ["_ct","_brightness","_contrast","_offset","_blendintensity","_colorintensity"];
in_storm = false;



_sanddust = 		//---spawn dusty clouds
{
_obj = vehicle player;
_pos = position _obj;
_color = [1.0, 0.8, 0.4];
_alpha = 0.1 + random 0.05;

_Wave = "#particlesource" createVehicleLocal getpos player;
_Wave setParticleParams 
[
/*Sprite*/				["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", 
/*Type*/					"Billboard", 
/*TimmerPer*/				5, 
/*Lifetime*/				20/2, 
/*Position*/				[0, 0, 0],
/*MoveVelocity*/			[0, 0, 0], 
/*Simulation*/				0, 2, 1, 0, 
/*Scale*/				[50, 100], 
/*Color*/					[_color + [0], _color + [_alpha], _color + [0]],
/*AnimSpeed*/			[1,0.5],

/*randDirPeriod*/			0.1,		//zeit in sek der änderung
/*randDirIntesity*/			1,			//geschwindigkeit in m/s

/*onTimerScript*/			"",
/*DestroyScript*/			"",
/*Object*/				_obj
];

_Wave setParticleCircle [50, [-40, -40, 2.5]];
_Wave setDropInterval 0.01;

waitUntil {not (vehicle player in list sandstorm1 or vehicle player in list sandstorm2)};
deleteVehicle _wave;
};



_colors =			//---deep color effects
{
_ct = 0.5;
_brightness_max = 1.008;
_brightness = 1.000;
_contrast_max = 1.40;
_contrast = 1.00;
_offset_max = -0.05;
_offset = 0.00;
_blendintensity_max = 0.30;
_blendintensity = 0.00;
_colorintensity_max = 0.85;
_colorintensity = 1.00;


while {_brightness <= _brightness_max} do 
{
	if (not (vehicle player in list sandstorm1 or vehicle player in list sandstorm2)) exitWith {};
	_brightness = _brightness+0.02; sleep _ct;"colorCorrections" ppeffectenable true;
	"colorCorrections" ppeffectadjust [_brightness, _contrast, _offset, [0.4, 0.3, 0.2, _blendintensity], [1, 0.8, 0.2, _colorintensity], [1, 1, 1, 1]];
	"colorCorrections" ppEffectCommit 0;
};
while {_contrast <= _contrast_max} do 
{
	if (not (vehicle player in list sandstorm1 or vehicle player in list sandstorm2)) exitWith {};
	_contrast = _contrast+0.05; sleep _ct;"colorCorrections" ppeffectenable true;
	"colorCorrections" ppeffectadjust [_brightness, _contrast, _offset, [0.4, 0.3, 0.2, _blendintensity], [1, 0.8, 0.2, _colorintensity], [1, 1, 1, 1]];
	"colorCorrections" ppEffectCommit 0;
};
while {_offset >= _offset_max} do 
{
	if (not (vehicle player in list sandstorm1 or vehicle player in list sandstorm2)) exitWith {};
	_offset = _offset-0.01; sleep _ct;"colorCorrections" ppeffectenable true;
	"colorCorrections" ppeffectadjust [_brightness, _contrast, _offset, [0.4, 0.3, 0.2, _blendintensity], [1, 0.8, 0.2, _colorintensity], [1, 1, 1, 1]];
	"colorCorrections" ppEffectCommit 0;
};
while {_blendintensity <= _blendintensity_max} do 
{
	_blendintensity = _blendintensity+0.05; sleep _ct;"colorCorrections" ppeffectenable true;
	"colorCorrections" ppeffectadjust [_brightness, _contrast, _offset, [0.4, 0.3, 0.2, _blendintensity], [1, 0.8, 0.2, _colorintensity], [1, 1, 1, 1]];
	"colorCorrections" ppEffectCommit 0;
};
while {_colorintensity >= _colorintensity_max} do 
{
	if (not (vehicle player in list sandstorm1 or vehicle player in list sandstorm2)) exitWith {};
	_colorintensity = _colorintensity-0.05; sleep _ct;"colorCorrections" ppeffectenable true;
	"colorCorrections" ppeffectadjust [_brightness, _contrast, _offset, [0.4, 0.3, 0.2, _blendintensity], [1, 0.8, 0.2, _colorintensity], [1, 1, 1, 1]];
	"colorCorrections" ppEffectCommit 0;
};

while {vehicle player in list sandstorm1 or vehicle player in list sandstorm2} do 	//unsharpness
{
	"dynamicblur" ppeffectenable true;
	_rand1 = 0.3 + (random 0.3);
	"dynamicblur" ppeffectadjust [0.2 +(random 0.4)];
	"dynamicblur" ppeffectcommit _rand1;
	sleep _rand1;
	"dynamicblur" ppeffectadjust [random 0.02];
	"dynamicblur" ppeffectcommit 0.2+(random 2);
	sleep 3 + (random 8);
};
};


_no_colors =		//---back to deffault colors
{
_ct = 0.5;
_brightness = 1.008;
_brightness_normal = 1.000;
_contrast = 1.40;
_contrast_normal = 1.00;
_offset = -0.05;
_offset_normal = 0.00;
_blendintensity = 0.30;
_blendintensity_normal = 0.00;
_colorintensity = 0.85;
_colorintensity_normal = 1.00;


while {_brightness >= _brightness_normal} do 
{
	_brightness = _brightness-0.02; sleep _ct;"colorCorrections" ppeffectenable true;
	"colorCorrections" ppeffectadjust [_brightness, _contrast, _offset, [0.4, 0.3, 0.2, _blendintensity], [1, 0.8, 0.2, _colorintensity], [1, 1, 1, 1]];
	"colorCorrections" ppEffectCommit 0;
};
while {_contrast >= _contrast_normal} do 
{
	_contrast = _contrast-0.05; sleep _ct;
	"colorCorrections" ppeffectadjust [_brightness, _contrast, _offset, [0.4, 0.3, 0.2, _blendintensity], [1, 0.8, 0.2, _colorintensity], [1, 1, 1, 1]];
	"colorCorrections" ppEffectCommit 0;
};
while {_offset <= _offset_normal} do 
{
	_offset = _offset+0.01; sleep _ct;
	"colorCorrections" ppeffectadjust [_brightness, _contrast, _offset, [0.4, 0.3, 0.2, _blendintensity], [1, 0.8, 0.2, _colorintensity], [1, 1, 1, 1]];
	"colorCorrections" ppEffectCommit 0;
};
while {_blendintensity >= _blendintensity_normal} do 
{
	_blendintensity = _blendintensity-0.05; sleep _ct;
	"colorCorrections" ppeffectadjust [_brightness, _contrast, _offset, [0.4, 0.3, 0.2, _blendintensity], [1, 0.8, 0.2, _colorintensity], [1, 1, 1, 1]];
	"colorCorrections" ppEffectCommit 0;
};
while {_colorintensity <= _colorintensity_normal} do 
{
	_colorintensity = _colorintensity+0.05; sleep _ct;
	"colorCorrections" ppeffectadjust [_brightness, _contrast, _offset, [0.4, 0.3, 0.2, _blendintensity], [1, 0.8, 0.2, _colorintensity], [1, 1, 1, 1]];
	"colorCorrections" ppEffectCommit 0;
};
"colorCorrections" ppeffectenable false;
};


_norain =				//ensure that it not rainy
{
while {in_storm} do
{
	2 setRain 0.0;
	sleep 5;
};
};



_deffaultViewDistance =	//---back to deffault viewdistance
{
for [{_loop2=0}, {_loop2>=10}, {_loop2=_loop2+1}] do
{
	_i = 100;
	_actdist = viewDistance;
	if (_actdist >= BIS_EVO_vdist) then {_loop2 = 10};
	setViewDistance (_actdist + _i);
	if (vehicle player in list sandstorm1 or vehicle player in list sandstorm2) then {_loop2 = 10};
	sleep 1;
};
};



_lowViewDistance =		//---lower the viewdistance
{
for [{_loop=0}, {_loop>=10}, {_loop=_loop+1}] do
{
	_i = 100;
	_actdist = viewDistance;
	setViewDistance (_actdist - _i);
	if (not (vehicle player in list sandstorm1 or vehicle player in list sandstorm2)) then {_loop = 10};
	sleep 1;
};
};



_wind_sound = 				//---wind and windound
{
While {vehicle player in list sandstorm1 or vehicle player in list sandstorm2} do 
{
	setwind [0.201112,0.204166,true];
	_ran = ceil random 5;
	playsound format ["wind_%1",_ran];

	setwind [0.201112*2,0.204166*2,false];

	sleep (random 1);
	_delay = 3 + random 5;
	sleep _delay;
};
};





//----conditioner
for [{_loop=0}, {_loop<1}, {_loop=_loop}] do
{
waitUntil {vehicle player in list sandstorm1 or vehicle player in list sandstorm2};
in_storm = true;
if ((speed vehicle player) > 100) then
{
	10 setOvercast 0.85;
}
else
{
	if ((speed vehicle player) > 25) then
	{
		20 setOvercast 0.85;
	}
	else
	{
		if ((speed vehicle player) < 25) then
		{
			30 setOvercast 0.85;
		};
	};
};
[] spawn _norain;
[] spawn _lowViewDistance;
[] spawn _wind_sound;
sleep 0.1;
[] spawn _colors;
sleep 0.1;
[] spawn _sanddust;


waitUntil {not (vehicle player in list sandstorm1 or vehicle player in list sandstorm2)};
in_storm = false;
if ((speed vehicle player) > 100 or not alive player) then
{
	10 setOvercast 0.0;
}
else
{
	if ((speed vehicle player) > 25) then
	{
		20 setOvercast 0.0;
	}
	else
	{
		if ((speed vehicle player) < 25) then
		{
			30 setOvercast 0.0;
		};
	};
};
[] spawn _deffaultViewDistance;
[] spawn _no_colors;
setwind [0.101112,0.104166,false];
2 setRain 0.0;
"dynamicblur" ppeffectenable false;
sleep 1.0;
};

Share this post


Link to post
Share on other sites

Yeah I did Un-PBO the mission, I did find that script, so I suppose you can call it from a trigger like this:

Radio Alpha (Test)

Condition: this

On Act: null = [] execVM "sandstorm.sqf";

From there I should see a storm come around me?

Share this post


Link to post
Share on other sites

Without editing this script a bit it looks like you'll need to have 2 triggers set to activate the sandstorm.sqf, by (vehicle player) in thislist somewhere on the map, one named sandstorm1 and another trigger named sandstorm2,

Just using nul = execvm "sandstorm.sqf" will give errors and will not work. The script is waiting for it's self to be activated by the player in a vehicle or on foot to enter a trigger either called sandstorm1 or sandstorm 2, otherwise it will not fire and will not work.

Also you need to have something on the map named "wave" as this is waiting to be deleted by the script. It can be anything, an ammo box, whatever, but the scripts going to look for it and delete it, so not having it will give a script error when it trys to delete something called wave but it's not present.

That's it your done, or edit out the need for triggers named sandstorm1 and sandstorm2 and the deletevehicle _wave etc etc and then you should be able to simply use nul = execvm blah blah.

Edited by Koni

Share this post


Link to post
Share on other sites

Thanks for letting me know!

But I don't see how I can continually re-call the script, cause what I'm looking for is to call a sandstorm at random times during the mission.

If this script requires me to do all these things then I'm not sure how to use as such.

-Bigshot

Share this post


Link to post
Share on other sites

All you need to do move a trigger, there are a few ways of doing this.

If you want a storm all the way through the game just attach it to the player.

sandstorm1 attachto [player,[0,0,0]]

Or you can move it to another trigger when you enter an area.

name trigger area1

anyone present repeating

cond

vehicle player in thislist

on act

sandstorm1 setpos getpos area1

Share this post


Link to post
Share on other sites

Yeah that works, now I just need a script to call on the sandstorm script randomly from any where between 10-60 minutes.

thanks for the help man

-Bigshot

Share this post


Link to post
Share on other sites

A trigger can do that just set the timers to 10 35 60

Share this post


Link to post
Share on other sites

It can do it repeatedly though?

Like I make the trigger cover the entire map, and have it set to BLUFOR repeatedly.

But then what if I want the sandstorm to stop?

Share this post


Link to post
Share on other sites

kylania, I looked at the way you triggered the dust in the boxey example. I need to know how to make the cloud bigger, Also I need to know how to use that trigger for a crate falling from a parachute and the dust puffing as it lands. I could also use some help calling that spawned box with dust, but spawning at the back of a c130 on the ground. I have the boxes spawning at the back of the plane on the ground, now how to add the dust attached to the box.

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
Sign in to follow this  

×