Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Opticalsnare

Aircraft Particles

Recommended Posts

Hey guys ive been messing about recently make some particle effects for aircraft. Ive managed to make the particle effect all ok and exec it along with the vehicle the problem is that when at speed the particle emmitter cant seem to keep up with the aircraft and basicly flashes behind rather than follow it smoothly. I did check out some other afterburner scripts but these were a bit complex for me. Has anyone been able to find a solution to this?

Btw heres my script.

_leftengine = "#particlesource" createVehicle position _this;
_rightengine = "#particlesource" createVehicle position _this;

_leftengine setParticleCircle [0, [0, 0, 0]];
_leftengine setParticleRandom [0, [1, 0, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
_leftengine setParticleParams [["\warfxPE\ParticleEffects\Universal\Smoke", 1, 0, 1], "", "Billboard", 1, 0.1, [0.8, 0, -0.8], [-6, 0, 0], 0, 1.27, 1, 0, [0.75, 0.5, 0, 0.005],   [[1, 1, 0.2, 0],[1, 1, 0.2, -0.5],[1, 1, 0.2, -1],[1, 1, 0.2, -2],[1, 1, 0.2, -0.5], [1, 1, 0.2, -0.2], [0, 0.5, 1, 0]], [1], 0, 0, "", "", _this];
_leftengine setDropInterval 0.001;

_rightengine setParticleCircle [0, [0, 0, 0]];
_rightengine setParticleRandom [0, [1, 0, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
_rightengine setParticleParams [["\warfxPE\ParticleEffects\Universal\Smoke", 1, 0, 1], "", "Billboard", 1, 0.1, [-0.8, 0, -0.8], [-6, 0, 0], 0, 1.27, 1, 0, [0.75, 0.5, 0, 0.005], [[1, 1, 0.2, 0],[1, 1, 0.2, -0.5],[1, 1, 0.2, -1],[1, 1, 0.2, -2],[1, 1, 0.2, -0.5], [1, 1, 0.2, -0.2], [0, 0.5, 1, 0]], [1], 0, 0, "", "", _this];
_rightengine setDropInterval 0.001;

Edited by Opticalsnare

Share this post


Link to post
Share on other sites

Maybe the F-16 afterburner script can help you there.

It is not written by me, it was included in the ArmA 1 version of the F-16 i've started working with.

if (isnil "GLT_afterburner") then {
GLT_afterburner = {
	private ["_MaxIntensity","_Boost","_leftengine","_emitters","_Intensity","_looptime", "_plane", "_timestamp"];
	_MaxIntensity = 1;
	_Boost = 0.5;
	_Intensity = 0.4;
	_plane = _this;
	_maxspeed = getNumber (configFile >> "cfgVehicles" >> typeof _plane >> "maxSpeed");
	sleep 0.5;
	_plane say "GLT_F16_burner";
	_timestamp = time;
	_leftengine = "#particlesource" createVehicle position _plane;
	_emitters = [_leftengine];
	{_x setParticleRandom [0.05,[0.05,0.05,0.05],[0.05,0.05,0.05],0,0.8,[0.1,0.1,0.1,0],0,0]} foreach _emitters;
	{_x setDropInterval 0} foreach _emitters;
	_looptime = 0.1;
	_runtime = 200;
	_plane setVariable ["AfterBurner", false];
	while {(alive _plane) and  (((inputAction "HeliUp") + (inputAction "HeliThrottlePos"))>1.95)} do {
		if (isengineon _plane) then {
			if (time >= (_timestamp + 0.8)) then {
				_plane say "GLT_F16_burner";
				_timestamp = time;
			};
			if (_Intensity < _MaxIntensity) then {_Intensity = _Intensity + 0.1*(15*_looptime)};
			if ((speed _plane) < _maxspeed) then {_plane setVelocity [(velocity _plane select 0)+((vectordir _plane) select 0)*((_Boost*_Intensity/2)*(15*_looptime)),(velocity _plane select 1)+((vectordir _plane) select 1)*((_Boost*_Intensity/2)*(15*_looptime)),(velocity _plane select 2)+((vectordir _plane) select 2)*((_Boost*_Intensity/2)*(15*_looptime))]};
			if (fuel _plane > 0) then {_plane setFuel ((fuel _plane)-((1/9000)*(3*_looptime)))};
		} else {
			if (_Intensity > 0) then {_Intensity = _Intensity - 0.2*(15*_looptime)};
		};
		_leftengine setParticleParams ["\Ca\data\cl_exp","","Billboard",1,0.07,[0,-6.5,-0.9],[(velocity _plane select 0) - ((vectordir _plane) select 0)*20,(velocity _plane select 1) - ((vectordir _plane) select 1)*20,(velocity _plane select 2) - ((vectordir _plane) select 2)*20],1,1.2745,1,0,[0.4+(2*(speed _plane/_maxspeed)),0.5+(10*(speed _plane/_maxspeed))],[[0.040,0.100,0.900,0.1500*_Intensity],[0.200,0.200,0.800,0.1000*_Intensity],[0.500,0.200,0.000,0.0250*_Intensity],[0.000,0.000,0.000,0.0000*_Intensity]],[0],0,0,"","",_plane];
		{_x setpos (getpos _plane)} foreach _emitters;
		if (_Intensity > 0) then {{_x setDropInterval 0.001} foreach _emitters} else {{_x setDropInterval 0} foreach _emitters};
		sleep 0.05;
		_runtime = _runtime - 1;
	};
	deleteVehicle _leftengine;
	_plane setVariable ["AfterBurner", true];
	sleep 3;
};
};

Share this post


Link to post
Share on other sites
Sign in to follow this  

×