Jump to content
marki980908

Attach particle effect to object for a second

Recommended Posts

I have 2 codes

this addAction ["<t color='#FF0000'>Gravity Break","_veh = _this #0; _veh setvelocity [0 * (sin (getdir _veh )), 0 * (cos (getdir _veh )), 0]", [], 7, true, true, "", "_this == driver _target"]; 
this addAction ["<t color='#FFF800'>Gravity Boost","_veh = _this #0; _veh setvelocity [140 * (sin (getdir _veh )), 140 * (cos (getdir _veh )), 0]", [], 7, true, true, "", "_this == driver _target"]; 

First one makes the vehicle stop immediatly, other makes it go 500km/h immediatly.

 

What I want to do is to attach effects to the vehicle, so for example once it stops (I activate "gravity break") maybe distortion effect, or electricity effect, or both, or shock wave effect would be attached to a vehicle, but would dissapear after like a second. I will probably add playSound3d of an explosion aswell or sonic boom.

My question is, can someone help me with that, I am not really sure how effects or particle effects work in arma, I heard it is janky

Share this post


Link to post
Share on other sites

Okay I am having some problems, and it didn't help that my arma decided to stop showing me script errors when those happen.

_OBJ = GameLogicOne;
_PS = "#particlesource" createVehicleLocal getpos _OBJ;
_PS setParticleCircle [0, [0, 0, 0]]; 
_PS setParticleRandom [0, [0, 0, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0]; 
_PS setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 3, 1], "", "Billboard", 1, 3.0141, [0, 0, 2], [0, 0, 0], 1, 1.275, 1, 0, [6, 6], [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], [1], 1, 0, "", "", _OBJ]; 
_PS setDropInterval 3.0;

That doesnt work, I browsed other people mods and config files and found a few effects that might be of kinda interest like:

"\A3\data_f\proxies\muzzle_flash\mf_sparks_01.p3d"
"\A3\data_f\ParticleEffects\Universal\Refract.p3d"
"\A3\data_f\blesk1"

I am really not sure what I am doing wrong

EDIT: I found a way to add distortion effect, and sparks..kinda....but for some reason it doesnt let me change their color

Share this post


Link to post
Share on other sites
spark4 = "#particlesource" createVehicle (getpos _this);
spark4 setParticleRandom [0, [0.25, 0.25, 0], [5, 5, 5], 0, 0.1, [0, 0, 0, 0.1], 0, 0];
spark4 setParticleParams [["\A3\data_f\proxies\muzzle_flash\mf_sparks_01.p3d", 1, 0, 1], "", "SpaceObject", 1, 2, [0, 0, 0], [0, 0, 0.75], 13, 10, 7.9, 0.075, [2, 0.5], [[1, 1, 1, 1], [1, 1, 1, 1], [0.5, 0.5, 0.5, 0]], [0.08], 1, 0, "", "", _this];
spark4 setDropInterval 0.002;

spark4 = "#particlesource" createVehicle (getpos _this);
spark4 setParticleRandom [0, [0.25, 0.25, 0], [5, 5, 5], 0, 0.1, [0, 0, 0, 0.1], 0, 0];
spark4 setParticleParams [["\A3\data_f\proxies\muzzle_flash\mf_sparks_02.p3d", 1, 0, 1], "", "SpaceObject", 1, 2, [0, 0, 0], [0, 0, 0.75], 13, 10, 7.9, 0.075, [2, 0.5], [[1, 1, 1, 1], [1, 1, 1, 1], [0.5, 0.5, 0.5, 0]], [0.08], 1, 0, "", "", _this];
spark4 setDropInterval 0.002;

How to make them blue?

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

×