eggbeast 3685 Posted October 25, 2012 hi re Afterburner bug AND missile lock bug in manual fire can anyone point me to a solution to why certain planes bug out with their afterburner? when you enable it you fly off the map, run outof fuel and glide to your death, or an elegant silent landing in the desert... the Su24 fencer has it the F4 has it however the Su33 does not have it and the F15 does not have it. compare the afterburner scripts from the F15 (works fine) and the su24 below... //su24 does not work - flies into space // --------------------- // Original FX scripts by Lethal // Modified by Gnat // --------------------- private ["_MaxIntensity","_Boost","_leftengine","_rightengine","_emitters","_Intensity","_looptime", "_plane"]; _MaxIntensity = 0.2; _Boost = 0.0015; _Intensity = 0.15; _maxspeed = 1350; _plane = _this; _plane animate ["ABSwitch",1]; sleep 0.5; _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; _runtime = 200; while {(alive _plane) and (_plane animationphase "ABSwitch" >= 0.1)} do { if (isengineon _plane) 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)*(15*_looptime)),(velocity _this select 1)+((vectordir _this) select 1)*((_Boost*_Intensity/2)*(15*_looptime)),(velocity _this select 2)+((vectordir _this) select 2)*((_Boost*_Intensity/2)*(10*_looptime))]}; if (fuel _this > 0) then {_this setFuel ((fuel _this)-((0.005/12500)*(3*_looptime)))}; } else { if (_Intensity > 0) then {_Intensity = _Intensity - 0.2*(15*_looptime)} }; _leftengine setParticleParams ["\Ca\data\cl_exp","","Billboard",1,0.07,[-0.78,-12.5,-.95],[(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 ["\Ca\data\cl_exp","","Billboard",1,0.07,[0.78,-12.5,-.95],[(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}; _looptime = time; sleep 0.05; _runtime = _runtime - 1; }; deleteVehicle _leftengine; deleteVehicle _rightengine; sleep 3; //F15 script works fine // --------------------- // Original FX scripts by Lethal // Modified by Gnat // --------------------- private ["_MaxIntensity","_Boost","_leftengine","_rightengine","_emitters","_Intensity","_looptime", "_plane"]; _MaxIntensity = 0.28;//different _Boost = 0.0015; _Intensity = 0.25;//different //_this setvariable ["afterburner",false]; _maxspeed = 1350; _plane = _this; _plane animate ["ABSwitch",1]; sleep 0.5; _this say "RKTF15_burner";//different but not relevant _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; _runtime = 200; while {(alive _plane) and (_plane animationphase "ABSwitch" >= 0.1)} do { if (isengineon _plane) 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)*(15*_looptime)),(velocity _this select 1)+((vectordir _this) select 1)*((_Boost*_Intensity/2)*(15*_looptime)),(velocity _this select 2)+((vectordir _this) select 2)*((_Boost*_Intensity/2)*(10*_looptime))]}; if (fuel _this > 0) then {_this setFuel ((fuel _this)-((0.005/12500)*(3*_looptime)))}; } else {if (_Intensity > 0) then {_Intensity = _Intensity - 0.2*(15*_looptime)}}; _leftengine setParticleParams ["\Ca\data\cl_exp","","Billboard",1,0.07,[-0.70,-7.2,-.80],[(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 ["\Ca\data\cl_exp","","Billboard",1,0.07,[0.70,-7.2,-.80],[(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}; _looptime = time; sleep 0.05; // mod by Crowe _runtime = _runtime - 1; }; deleteVehicle _leftengine; deleteVehicle _rightengine; sleep 3; lastly, why can the Su24 pilot in manual fire lock and engage enemy targets with the same missiles (ch29 for example) that cannot be used when applied to the Su34ME or stock Su34? the su24 has the following present driveriscommander =1; //in turret outgunnermayfire =1; ingunnermayfire =1; do these enable the pilot in manual fire to lock and home on enemy IR targets? or is it the missiles being different? I don't think it is because I added the same launcher/missiles to each plane and they only lock for su24... once I know we can do a config patch for our server (our own use) and contact the mod authors to see if they want the fixes... cheers guys Share this post Link to post Share on other sites
eggbeast 3685 Posted October 26, 2012 this is not v helpful http://community.bistudio.com/wiki/CfgVehicles_Config_Reference Share this post Link to post Share on other sites
[aps]gnat 28 Posted October 26, 2012 this is not v helpfulhttp://community.bistudio.com/wiki/CfgVehicles_Config_Reference Why would it? first post is Script. Second post is Configs My modified script used on not-my-plane ...... so who knows ...... My guess is the animation is missing from inside the 3d model, so this bit doesn't do anything _plane animate ["ABSwitch",1]; Or the sleep 0.05; // mod by Crowe Share this post Link to post Share on other sites
eggbeast 3685 Posted October 26, 2012 it would help because the second part of my post relates to configs - sorry for fusing the issues together in one post! I'm editing the configs in a patch to try to fix the manual fire locking problem with 2 seater planes (su34 etc) that seems somehow to work on the su24. at the same time i'm trying to fix the su24 afterburner bug because it is causing a lot of nasty accidents on our server right now! sleep 0.05; // mod by Crowe i think that sleep was put in ages ago because of this bug? My guess is the animation is missing from inside the 3d model, so this bit doesn't do anything ah so that animation needs to be in the model? so we need to repair the afterburner script with a scripted toggling off of AB at max speed? it won't change the anim state of the plane but it's ok as i wasn't adding one anyway (to the su34) ---------- Post added at 03:26 PM ---------- Previous post was at 03:08 PM ---------- strangely the su24 does toggle to afterburner off action, so i guess the animation is present. however the acceleration is so great that the fueltank is empty before you can switch it off... this is what i'm trying to fix. ---------- Post added at 04:52 PM ---------- Previous post was at 03:26 PM ---------- interestingly, changing the su24 afterburner script to use the same values as the f15 originally had _MaxIntensity = 0.28;//different _Boost = 0.0015; _Intensity = 0.25;//different works a treat - no more rocketing off into space Share this post Link to post Share on other sites
eggbeast 3685 Posted October 26, 2012 hmmm i can now seem to get the pilot to work as a gunner with lockable missiles in manual fire using this config patch for the su34 (stock) class Su34: Plane { radarType = 4; LockDetectionSystem = 8; IncommingMisslieDetectionSystem = 16; soundLocked[] = {"\ca\Tracked\Data\Sound\alarm_loop1",0.000316228,2}; soundIncommingMissile[] = {"\ca\Tracked\Data\Sound\alarm_loop1",0.000316228,4}; gunnerAction = "SU25_Pilot"; hasGunner = 1; driverIsCommander = 1; type = "Air"; irTarget = 1; irScanGround = 1; irScanRangeMin = 10000; irScanRangeMax = 60000000; crewVulnerable = 1; laserscanner = 1; weapons[] = {"GSh301","CMFlareLauncher"}; magazines[] = {"180Rnd_30mm_GSh301","120Rnd_CMFlare_Chaff_Magazine"}; class Turrets { class MainTurret: NewTurret { body = "mainturret"; gun = "maingun"; inGunnerMayFire = 1; gunnerAction = "SU25_Pilot"; }; }; class AnimationSources { class ABSwitch { source = "user"; animPeriod = 1; initPhase = 0; }; }; class UserActions { class Afterburner { displayName = "Afterburner On"; position = "pilotcontrol"; radius = 15; condition = "(speed this >50) && (this animationPhase 'ABSwitch' <= 0.1) && (player == (driver this))"; statement = "this execvm '\rus_gdt_heliweps\afterburner.sqf'; "; onlyforplayer = "False"; }; class Afterburner_1 { displayName = "Afterburner Off"; position = "pilotcontrol"; radius = 15; condition = "(this animationPhase 'ABSwitch' >= 0.9) && (player == (driver this))"; statement = "this animate ['ABSwitch',0]"; onlyforplayer = "False"; }; class setGPSposition { priority = 0; shortcut = ""; displayNameDefault = ""; position = "pilotcontrol"; radius = 15; onlyforplayer = 1; displayName = "GPS/INS Menu"; condition = "(alive this) && (player == (driver this))"; statement = "createDialog 'glt_airgpsmfd'"; }; }; }; gunnerAction = "SU25_Pilot"; this seems to be the key to it - it is used in the su24 mod and enables the locking of missiles for the manual fire pilot the afterburner is fixed for the su24 by using the default values - footmunch or someone else had changed them making it a battlestar galactica ride to hell so now just need to work on a script to run the afterburner on the su34, which does not work using animation (as I don't model, just config/script) ---------- Post added at 07:45 PM ---------- Previous post was at 07:37 PM ---------- again there's nothing in the wiki here about this at all - can anyone shed any more light on my fumbling research here? http://community.bistudio.com/wiki/Turret_Config_Reference#gunnerAction.3D_.22.22 Share this post Link to post Share on other sites
eggbeast 3685 Posted October 27, 2012 bah it's the usual arma scripting nightmare- it all worked earlier so i went for dinner andwhen i came back everything fails - the afterburner is once more like a rocket going off, leaving me pasted along the runway, the su34's don't lock targets anymore, and the tu22 which now does lock targets really well has lost all of its initial armaments... grrr - another day lost in the wilderness... has anyone else managed to work out how to lock targets with a CH29 in a su34 when alone in a plane as pilot/manual fire? i'm just trying to get these dumb russian planes to work with a single human pilot... Share this post Link to post Share on other sites
eggbeast 3685 Posted October 28, 2012 nearly there got all the 2 seater planes working now using su25pilot as the default anim they lock targets in manual fire now woohoo just adding afterburners by script - a tough nut to crack without using animations (modeling) seems to work ok - needs some though on how best to toggle on/off addaction to a vehicle you are in is totally worthless? Share this post Link to post Share on other sites
[aps]gnat 28 Posted October 28, 2012 BIS have added "setVariable" and "getVariable" since the first days of these AB scripts ............ Share this post Link to post Share on other sites
eggbeast 3685 Posted November 9, 2012 thanks Gnat - will try it out Share this post Link to post Share on other sites
eggbeast 3685 Posted November 28, 2012 it turned out that the reason my fixes were rolling back was bigpickle joining our server with a sound mod that reconfigged the planes! go figure. I'll PM myke to see if he wants to have a look at his su24 AB and modify the thrust Share this post Link to post Share on other sites
bigpickle 0 Posted December 2, 2012 LOL blame the pickle :p Share this post Link to post Share on other sites
eggbeast 3685 Posted December 2, 2012 you know who you are! Share this post Link to post Share on other sites