Where do the .sqf files go? Not much experience with arma editing and such.
Where do the .sqf files go? Not much experience with arma editing and such.
It works.
I modified some things so that it is MP compatible.
What did you do?Originally Posted by (Crowe @ Oct. 06 2007,16:40)
Here the changes i made:
My vehicle repawn script: (initialisation initline)
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
_veh = _this select 0;
_destroyed = _this select 1;
if (local player) then
{
[_veh] execVM "client\aircrafteffects\AircraftEffect s.sqf";
[_veh,_destroyed] execVM "client\destroyeffect.sqf";
};
if (isserver) then
{
[_veh] execVM "server\veh.sqf";
};
[/QUOTE]
AircraftEffects.sqf:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
_veh = (_this select 0);
Private ["_script1","_script2","_s cript3","_script4"];
if ( (_veh iskindof "Su34")||(_veh iskindof "Su34B") ) then
{
_script1 = _veh execVM "client\aircrafteffects\SU34_Afterburn er.sqf";
_script2 = _veh execVM "client\aircrafteffects\SonicBoom.sqf& #34;;
_script3 = _veh execVM "client\aircrafteffects\SU34_WingtipTr ails.sqf";
_script4 = _veh execVM "client\aircrafteffects\SU34_FuselageV apour.sqf";
waituntil {(!(alive _veh))};
terminate _script1;
terminate _script2;
terminate _script3;
terminate _script4;
};
if ( (_veh iskindof "AV8B")||(_veh iskindof "AV8B2") ) then
{
_script1 = _veh execVM "client\aircrafteffects\AV8B_WingtipTr ails.sqf";
_script2 = _veh execVM "client\aircrafteffects\AV8B_FuselageV apour.sqf";
waituntil {(!(alive _veh))};
terminate _script1;
terminate _script2;
};
[/QUOTE]
Client init script:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
// Aircraft effects (mod by Crowe):
finddisplay(46) displayseteventhandler ["Keydown","if ((_this select 1) == 42) then {(vehicle player) setvehicleinit ""this setVariable [""""afterburner""" ;",true]"";processinitcommands;}&# 34;];
finddisplay(46) displayseteventhandler ["Keyup","if ((_this select 1) == 42) then {(vehicle player) setvehicleinit ""this setVariable [""""afterburner""" ;",false]"";processinitcommands;}& #34;];
[/QUOTE]
su_afterburner.sqf:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
private ["_MaxIntensity","_Boost"," ;_leftengine","_rightengine","_emi tters","_Intensity","_looptime" ;];
_MaxIntensity = 2;
_Boost = 0.4;
_Intensity = 0;
_this setvariable ["afterburner",false];
_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 "afterburner")) then
{
if (_Intensity < _MaxIntensity) then {_Intensity = _Intensity + 0.1*(10*_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*(10*_looptime)}};
_leftengine setParticleParams ["\Ca\data\cl_exp","&# 34;,"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*(s peed _this/_maxspeed)),0.5+(10*(speed _this/_maxspeed))],[[0.040,0.100,0.9 00,0.1500*_Intensity],[0.200,0.200,0.800,0 .1000*_Intensity],[0.500,0.200,0.000,0.025 0*_Intensity],[0.000,0.000,0.000,0.0000*_I ntensity]],[0],0,0,""," ;",_this];
_rightengine setParticleParams ["\Ca\data\cl_exp","&# 34;,"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*(s peed _this/_maxspeed)),0.5+(10*(speed _this/_maxspeed))],[[0.040,0.100,0.9 00,0.1500*_Intensity],[0.200,0.200,0.800,0 .1000*_Intensity],[0.500,0.200,0.000,0.025 0*_Intensity],[0.000,0.000,0.000,0.0000*_I ntensity]],[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};
_looptime = time;
sleep 0.05; // mod by Crowe
_looptime = time - _looptime;
};
//[(velocity _this select 0) - ((vectordir _this) select 0)*30*(1/(speed _this + 1)),(velocity _this select 1) - ((vectordir _this) select 1)*30*(1/(speed _this + 1)),(velocity _this select 2) - ((vectordir _this) select 2)*30*(1/(speed _this + 1))]
[/QUOTE]
Have fun
Crowe![]()
@Crowe
How do I make this work? I cant see how you activated the script on the SU. Im not the best scripter, I just started. Is it possible for you to releases it in a mission, so i can see how you did it?
Also, to fix the problem where the right engine cuts out at really high speeds, change
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_rightengine setParticleParams ["\Ca\data\cl_exp","&# 34;,"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*(s peed _this/_maxspeed)),0.5+(10*(speed _this/_maxspeed))],[[0.040,0.100,0.9 00,0.1500*_Intensity],[0.200,0.200,0.800,0 .1000*_Intensity],[0.500,0.200,0.000,0.025 0*_Intensity],[0.000,0.000,0.000,0.0000*_I ntensity]],[0],0,0,""," ;",_this];[/QUOTE]
to
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_rightengine setParticleParams ["\Ca\data\cl_exp","&# 34;,"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*(s peed _this/_maxspeed)),0.5+(10*(speed _this/_maxspeed))],[[0.040,0.100,0.9 00,0.1500*_Intensity],[0.200,0.200,0.800,0 .1000*_Intensity],[0.500,0.200,0.000,0.025 0*_Intensity],[0.000,0.000,0.000,0.0000*_I ntensity]],[0],0,0,""," ;",_this];[/QUOTE]
in AfterBurner.sqf
Also also, i did the stuff you said to do Crowe, and it still doesn't work in MP. Think i did it wrong. If you could link all the files and stuff...
Well, the wingtip trails and fuselage vapors work, just not the afterburner.
is this all dead or what?
this is a very awesome script suite (one of the best i've seen yet), and i spent some time to create a solution to make it easy use in MP game clients, too ... it works perfekt on SU34 scripts i got, and i am willed to plug em in my v2.0 project as i can get the full suite (soon).
the only thing i can't solve yet is the afterburner, so i still not use it, but the other effects are working very well on all clients...
please keep this thread alive man.
Regards,
zap