Page 9 of 9 FirstFirst ... 56789
Results 81 to 87 of 87

Thread: Afterburner on su34

  1. #81
    Where do the .sqf files go? Not much experience with arma editing and such.

  2. #82
    It works.

    I modified some things so that it is MP compatible.






  3. #83
    Quote Originally Posted by (Crowe @ Oct. 06 2007,16:40)
    It works.

    I modified some things so that it is MP compatible.

    What did you do?

  4. #84
    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 &#40;local player&#41; then
    {
    &#91;_veh&#93; execVM &#34;client&#92;aircrafteffects&#92;AircraftEffect s.sqf&#34;;
    &#91;_veh,_destroyed&#93; execVM &#34;client&#92;destroyeffect.sqf&#34;;
    };

    if &#40;isserver&#41; then
    {
    &#91;_veh&#93; execVM &#34;server&#92;veh.sqf&#34;;
    };
    [/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 = &#40;_this select 0&#41;;

    Private &#91;&#34;_script1&#34;,&#34;_script2&#34;,&#34;_s cript3&#34;,&#34;_script4&#34;&#93;;

    if &#40; &#40;_veh iskindof &#34;Su34&#34;&#41;&#124;&#124;&#40;_veh iskindof &#34;Su34B&#34;&#41; &#41; then
    {
    _script1 = _veh execVM &#34;client&#92;aircrafteffects&#92;SU34_Afterburn er.sqf&#34;;
    _script2 = _veh execVM &#34;client&#92;aircrafteffects&#92;SonicBoom.sqf& #34;;
    _script3 = _veh execVM &#34;client&#92;aircrafteffects&#92;SU34_WingtipTr ails.sqf&#34;;
    _script4 = _veh execVM &#34;client&#92;aircrafteffects&#92;SU34_FuselageV apour.sqf&#34;;

    waituntil {&#40;&#33;&#40;alive _veh&#41;&#41;};

    terminate _script1;
    terminate _script2;
    terminate _script3;
    terminate _script4;
    };

    if &#40; &#40;_veh iskindof &#34;AV8B&#34;&#41;&#124;&#124;&#40;_veh iskindof &#34;AV8B2&#34;&#41; &#41; then
    {
    _script1 = _veh execVM &#34;client&#92;aircrafteffects&#92;AV8B_WingtipTr ails.sqf&#34;;
    _script2 = _veh execVM &#34;client&#92;aircrafteffects&#92;AV8B_FuselageV apour.sqf&#34;;

    waituntil {&#40;&#33;&#40;alive _veh&#41;&#41;};

    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 &#40;mod by Crowe&#41;&#58;
    finddisplay&#40;46&#41; displayseteventhandler &#91;&#34;Keydown&#34;,&#34;if &#40;&#40;_this select 1&#41; == 42&#41; then {&#40;vehicle player&#41; setvehicleinit &#34;&#34;this setVariable &#91;&#34;&#34;&#34;&#34;afterburner&#34;&#34;&#34 ;&#34;,true&#93;&#34;&#34;;processinitcommands;}&# 34;&#93;;
    finddisplay&#40;46&#41; displayseteventhandler &#91;&#34;Keyup&#34;,&#34;if &#40;&#40;_this select 1&#41; == 42&#41; then {&#40;vehicle player&#41; setvehicleinit &#34;&#34;this setVariable &#91;&#34;&#34;&#34;&#34;afterburner&#34;&#34;&#34 ;&#34;,false&#93;&#34;&#34;;processinitcommands;}& #34;&#93;;
    [/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 &#91;&#34;_MaxIntensity&#34;,&#34;_Boost&#34;,&#34 ;_leftengine&#34;,&#34;_rightengine&#34;,&#34;_emi tters&#34;,&#34;_Intensity&#34;,&#34;_looptime&#34 ;&#93;;

    _MaxIntensity = 2;
    _Boost = 0.4;
    _Intensity = 0;
    _this setvariable &#91;&#34;afterburner&#34;,false&#93;;

    _maxspeed = 1300;

    _leftengine = &#34;#particlesource&#34; createVehicle position _this;
    _rightengine = &#34;#particlesource&#34; createVehicle position _this;
    _emitters = &#91;_leftengine,_rightengine&#93;;
    {_x setParticleRandom &#91;0.05,&#91;0.05,0.05,0.05&#93;,&#91;0.05,0.05, 0.05&#93;,0,0.8,&#91;0.1,0.1,0.1,0&#93;,0,0&#93;} foreach _emitters;
    {_x setDropInterval 0} foreach _emitters;
    _looptime = 0.1;
    while {true} do {
    if &#40;&#40;isengineon _this&#41; and &#40;_this getvariable &#34;afterburner&#34;&#41;&#41; then
    {
    if &#40;_Intensity &#60; _MaxIntensity&#41; then {_Intensity = _Intensity + 0.1*&#40;10*_looptime&#41;};
    if &#40;&#40;speed _this&#41; &#60; _maxspeed&#41; then {_this setVelocity &#91;&#40;velocity _this select 0&#41;+&#40;&#40;vectordir _this&#41; select 0&#41;*&#40;&#40;_Boost*_Intensity/2&#41;*&#40;10*_looptime&#41;&#41;,&#40;velocity _this select 1&#41;+&#40;&#40;vectordir _this&#41; select 1&#41;*&#40;&#40;_Boost*_Intensity/2&#41;*&#40;10*_looptime&#41;&#41;,&#40;velocity _this select 2&#41;+&#40;&#40;vectordir _this&#41; select 2&#41;*&#40;&#40;_Boost*_Intensity/2&#41;*&#40;10*_looptime&#41;&#41;&#93;};
    if &#40;fuel _this &#62; 0&#41; then {_this setFuel &#40;&#40;fuel _this&#41;-&#40;&#40;1/1200&#41;*&#40;10*_looptime&#41;&#41;&#41;};
    }
    else {if &#40;_Intensity &#62; 0&#41; then {_Intensity = _Intensity - 0.2*&#40;10*_looptime&#41;}};
    _leftengine setParticleParams &#91;&#34;&#92;Ca&#92;data&#92;cl_exp&#34;,&#34;&# 34;,&#34;Billboard&#34;,1,0.07,&#91;-1.14,-8.3,-0.8&#93;,&#91;&#40;velocity _this select 0&#41; - &#40;&#40;vectordir _this&#41; select 0&#41;*30,&#40;velocity _this select 1&#41; - &#40;&#40;vectordir _this&#41; select 1&#41;*30,&#40;velocity _this select 2&#41; - &#40;&#40;vectordir _this&#41; select 2&#41;*30&#93;,1,1.2745,1,0,&#91;0.6+&#40;2*&#40;s peed _this/_maxspeed&#41;&#41;,0.5+&#40;10*&#40;speed _this/_maxspeed&#41;&#41;&#93;,&#91;&#91;0.040,0.100,0.9 00,0.1500*_Intensity&#93;,&#91;0.200,0.200,0.800,0 .1000*_Intensity&#93;,&#91;0.500,0.200,0.000,0.025 0*_Intensity&#93;,&#91;0.000,0.000,0.000,0.0000*_I ntensity&#93;&#93;,&#91;0&#93;,0,0,&#34;&#34;,&#34 ;&#34;,_this&#93;;
    _rightengine setParticleParams &#91;&#34;&#92;Ca&#92;data&#92;cl_exp&#34;,&#34;&# 34;,&#34;Billboard&#34;,1,&#40;0.07-&#40;0.072*&#40;speed _this/_maxspeed&#41;&#41;&#41;,&#91;1.14,-8.3,-0.8&#93;,&#91;&#40;velocity _this select 0&#41; - &#40;&#40;vectordir _this&#41; select 0&#41;*30,&#40;velocity _this select 1&#41; - &#40;&#40;vectordir _this&#41; select 1&#41;*30,&#40;velocity _this select 2&#41; - &#40;&#40;vectordir _this&#41; select 2&#41;*30&#93;,1,1.2745,1,0,&#91;0.6+&#40;2*&#40;s peed _this/_maxspeed&#41;&#41;,0.5+&#40;10*&#40;speed _this/_maxspeed&#41;&#41;&#93;,&#91;&#91;0.040,0.100,0.9 00,0.1500*_Intensity&#93;,&#91;0.200,0.200,0.800,0 .1000*_Intensity&#93;,&#91;0.500,0.200,0.000,0.025 0*_Intensity&#93;,&#91;0.000,0.000,0.000,0.0000*_I ntensity&#93;&#93;,&#91;0&#93;,0,0,&#34;&#34;,&#34 ;&#34;,_this&#93;;
    {_x setpos &#40;getpos _this&#41;} foreach _emitters;
    if &#40;_Intensity &#62; 0&#41; then {{_x setDropInterval 0.001} foreach _emitters} else {{_x setDropInterval 0} foreach _emitters};

    _looptime = time;

    sleep 0.05; // mod by Crowe

    _looptime = time - _looptime;
    };


    //&#91;&#40;velocity _this select 0&#41; - &#40;&#40;vectordir _this&#41; select 0&#41;*30*&#40;1/&#40;speed _this + 1&#41;&#41;,&#40;velocity _this select 1&#41; - &#40;&#40;vectordir _this&#41; select 1&#41;*30*&#40;1/&#40;speed _this + 1&#41;&#41;,&#40;velocity _this select 2&#41; - &#40;&#40;vectordir _this&#41; select 2&#41;*30*&#40;1/&#40;speed _this + 1&#41;&#41;&#93;

    [/QUOTE]

    Have fun

    Crowe

  5. #85
    Warrant Officer Iceman77's Avatar
    Join Date
    Jul 13 2007
    Location
    Fairbanks Alaska
    Posts
    2,827
    @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?

  6. #86
    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 &#91;&#34;&#92;Ca&#92;data&#92;cl_exp&#34;,&#34;&# 34;,&#34;Billboard&#34;,1,&#40;0.07-&#40;0.072*&#40;speed _this/_maxspeed&#41;&#41;&#41;,&#91;1.14,-8.3,-0.8&#93;,&#91;&#40;velocity _this select 0&#41; - &#40;&#40;vectordir _this&#41; select 0&#41;*30,&#40;velocity _this select 1&#41; - &#40;&#40;vectordir _this&#41; select 1&#41;*30,&#40;velocity _this select 2&#41; - &#40;&#40;vectordir _this&#41; select 2&#41;*30&#93;,1,1.2745,1,0,&#91;0.6+&#40;2*&#40;s peed _this/_maxspeed&#41;&#41;,0.5+&#40;10*&#40;speed _this/_maxspeed&#41;&#41;&#93;,&#91;&#91;0.040,0.100,0.9 00,0.1500*_Intensity&#93;,&#91;0.200,0.200,0.800,0 .1000*_Intensity&#93;,&#91;0.500,0.200,0.000,0.025 0*_Intensity&#93;,&#91;0.000,0.000,0.000,0.0000*_I ntensity&#93;&#93;,&#91;0&#93;,0,0,&#34;&#34;,&#34 ;&#34;,_this&#93;;[/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 &#91;&#34;&#92;Ca&#92;data&#92;cl_exp&#34;,&#34;&# 34;,&#34;Billboard&#34;,1,0.07,&#91;1.14,-8.3,-0.8&#93;,&#91;&#40;velocity _this select 0&#41; - &#40;&#40;vectordir _this&#41; select 0&#41;*30,&#40;velocity _this select 1&#41; - &#40;&#40;vectordir _this&#41; select 1&#41;*30,&#40;velocity _this select 2&#41; - &#40;&#40;vectordir _this&#41; select 2&#41;*30&#93;,1,1.2745,1,0,&#91;0.6+&#40;2*&#40;s peed _this/_maxspeed&#41;&#41;,0.5+&#40;10*&#40;speed _this/_maxspeed&#41;&#41;&#93;,&#91;&#91;0.040,0.100,0.9 00,0.1500*_Intensity&#93;,&#91;0.200,0.200,0.800,0 .1000*_Intensity&#93;,&#91;0.500,0.200,0.000,0.025 0*_Intensity&#93;,&#91;0.000,0.000,0.000,0.0000*_I ntensity&#93;&#93;,&#91;0&#93;,0,0,&#34;&#34;,&#34 ;&#34;,_this&#93;;[/QUOTE]

    in AfterBurner.sqf


    Also also, i did the stuff you said to do Crowe, and it still doesn&#39;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.




  7. #87

    Wink

    is this all dead or what?

    this is a very awesome script suite (one of the best i&#39;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&#39;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

Page 9 of 9 FirstFirst ... 56789

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •