Jump to content
Sign in to follow this  
granQ

Afterburner particle flame..

Recommended Posts

I can do most of arma editing, configs, scripts and so on.. but particles I never understood..

need an "afterburner flame", anyone keen to help out? (For the JAS 39 Gripen)

Share this post


Link to post
Share on other sites

search Lethals afterburner script on armaholic or even google , possible only needs changing the path to particle and the frame sequence , i can help if you get that far

i would rewrite ( many have i see it everywhere ) but a bit pressed for time .

here it is :)

http://www.armaholic.com/page.php?id=974

i found some time :)

please respect i didnt have much and there was always aproblem with particles and planes and the stretch , hopefully you can tidy up and see if A3 is even better now , i had a little play with some things in time i had .

INIT .sqf for mission ( obviously for config you need to send it and change the (vehicle player) but i suggest you use in mission first to tweak

to activate press LeftShift and engine has to be on define for left shift is here ((_this select 1) == 42

if (isServer and isNull player) exitWith {};


private ["_i","_key","_slf_Keypressed"];

sleep 0.1;



nul = (vehicle player)  execVM "Afterburner.sqf";

_slf_KeyPressed = (findDisplay 46) displayAddEventHandler ["Keydown","if ((_this select 1) == 42) then {(vehicle player) setVariable [""_on"",true]}"];
_slf_KeyPressed = (findDisplay 46) displayAddEventHandler ["Keyup","if ((_this select 1) == 42) then {(vehicle player) setVariable [""_on"",false]}"];

Afterburner.sqf

// original script by Lethal for A1 Edited by Sealife for A3 2013

private ["_MaxIntensity","_Boost","_leftengine","_rightengine","_emitters","_Intensity","_On","_looptime"];

_MaxIntensity = 0.28;
_Boost = 0.0015;
_Intensity = 0.25;
_this setvariable ["_on",false];
hint format ["%1",position _this];
_maxspeed = 1300;

_leftengine = "#particlesource" createVehicle position _this;
_rightengine = "#particlesource" createVehicle position _this;
_emitters = [_leftengine,_rightengine];
{_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;
while {true} do	{
if ((isengineon _this) and (_this getvariable "_on")) then 
	{
	if (_Intensity < _MaxIntensity) then {_Intensity = _Intensity + 0.1*(15*_looptime)};
	if ((speed _this) < _maxspeed) then {_this setVelocity [(velocity _this select 0)+((vectordir _this) select 0)*((_Boost*_Intensity/2)*(10*_looptime)),(velocity _this select 1)+((vectordir _this) select 1)*((_Boost*_Intensity/2)*(10*_looptime)),(velocity _this select 2)+((vectordir _this) select 2)*((_Boost*_Intensity/2)*(10*_looptime))]};
	//if (fuel _this > 0) then {_this setFuel ((fuel _this)-((1/1200)*(10*_looptime)))};
	} 
else {
if (_Intensity > 0) then {_Intensity = _Intensity - 0.2*(15*_looptime)}};
_leftengine setParticleParams [["\A3\data_f\ParticleEffects\Universal\Refract",1,0,1,0],"","Billboard",1,0.07,[-1.14,-8.3,-0.8],[(velocity _this select 0) - ((vectordir _this) select 0)*30,(velocity _this select 1) - ((vectordir _this) select 1)*30,(velocity _this select 2) - ((vectordir _this) select 2)*30],1,1.2745,1,0,[0.6+(2*(speed _this/_maxspeed)),0.5+(10*(speed _this/_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,"","",_this];
_rightengine setParticleParams [["\A3\data_f\ParticleEffects\Universal\Refract",1,0,1,0],"","Billboard",1,(0.07-(0.072*(speed _this/_maxspeed))),[1.14,-8.3,-0.8],[(velocity _this select 0) - ((vectordir _this) select 0)*30,(velocity _this select 1) - ((vectordir _this) select 1)*30,(velocity _this select 2) - ((vectordir _this) select 2)*30],1,1.2745,1,0,[0.6+(2*(speed _this/_maxspeed)),0.5+(10*(speed _this/_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,"","",_this];
{_x setpos (getpos _this)} foreach _emitters;
if (_Intensity > 0) then {{_x setDropInterval 0.001} foreach _emitters} else {{_x setDropInterval 0} foreach _emitters};
_i = 0;
_looptime = time;
//waitUntil {_i = _i + 1; _i > 1};
_looptime = time - _looptime;
};

_leftengine setParticleParams [["\A3\data_f\ParticleEffects\Universal\Refract",1,0,1,0],"","Billboard",1,0.07,[-1.14,-8.3,-0.8] < where it appears on plane its same on rightengine

I suggest you put a point on your plane model and use selectionposition for better placement

something like memory vert called ABpointL and ABpointR

then replace [-1.14,-8.3,-0.8] with _lpos = plane selectionposition "ABpointL"

then

[["\A3\data_f\ParticleEffects\Universal\Refract",1,0,1,0],"","Billboard",1,0.07,_lpos, same for _Rpos on _rightengine

Hope this helps and works

i left credit to Lethal for original script in there and please i am no scripter believe me so maybe you or your team can tidy up and make MP compatible etc i have used the refract particle but maybe try the old CL_exp from a1 or such A3 equivalent :)

Edited by Sealife

Share this post


Link to post
Share on other sites

thanks a lot! this is really helpful and will look into it this weekend and hopefully get it working :)

Do we know if Lethal is happy to share his work? is he still active on bis forums?

Share this post


Link to post
Share on other sites

I left him message here on forums but i think he been away so long

also i think i changed so much in this script to leave credit for original is adequate , also precedneces with this script have been set , even Bis have this code in more recognisable than what i posted here lol :)

check there wingtipsA2 and Lethals wingtips A1 scripts , i dont recall if they left credit for Lethal or not but i hope he was employed ( hopefully he was) ;)

P>S i edited INit i made a wrong paste sorry

Edited by Sealife

Share this post


Link to post
Share on other sites

I tried your script (placed the init.sqf and Afterburner.sqf) as you have above but nothing happens (when pressing the LShift key).

 

If you could provide assistance I would appreciate.

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  

×