sevensixtytwo 10 Posted June 29, 2012 Hi all, I'm trying to make realistic recoilless rifles in OFP. The vanilla Carl Gustav was pretty disappointing since it fired a missile rather than a true recoilless rifle round, so deigned to make my own version for the AFP mod; the M67 90mm Recoilless Rifle of Korean/Vietnam War fame. CHANGES: I tweaked the hit value from 800 to 850 to take into account the larger diameter of the round. The simulation was switched from "shotmissile" to "shotshell" to get rid of the smoke trail. The sound of the 73mm tank gun was used instead of the weak FLOOMP of the original. The model of the round was changed to "shell" instead of "LAW" and finally, the round's init speed was changed to the M67's real world muzzle velocity of 213 m/s. The model itself is a BIS Carl Gustav with its front end lengthened while the rear flanging has been shortened. It's not exact, but it won't be confused with the CG anytime soon. RESULT: It looks and feels great, but still missing several elements like large backblast and whatnot. Is it possible to put in a tank-like blast behind the launcher? PROBLEM: Even with the range values untweaked, AI using the M67 move within 180 meters before engaging armored targets. I tried switching it back to shotmissile but the problem persists. Anyone have any idea what I did wrong? I'd rather not change the muzzle velocity back to the painfully slow vanilla. here's a copy of the config class AFP_M67Mag: CarlGustav { displayName ="90mm M67 Shell"; displayNameMagazine ="90mm M67 Shell"; shortNameMagazine ="90mm Shell"; hit=850; model="shell"; simulation="shotshell"; sound[] = {Weapons\gun73,db+20,1}; reloadMagazineSound[] = {Weapons\reload,db+20,1}; soundHit[]={"Explosions\explosion_large1",100.0000076,1}; soundFly[]={"objects\bulletnoise",0.0316228,4}; initSpeed=213; }; class AFP_M67Launcher:CarlGustavLauncher { model="\afp\m67\m67.p3d"; modelSpecial="\afp\m67\m67.p3d"; modelOptics="optika_CarlGustav"; ammo="AFP_M67Mag"; displayName="M67 Recoilless Rifle"; displayNameMagazine="90mm RR"; shortNameMagazine="90mm RR"; magazines[]={"AFP_M67Mag"}; }; Share this post Link to post Share on other sites
stgn 39 Posted June 29, 2012 Hi all, I'm trying to make realistic recoilless rifles in OFP. The vanilla Carl Gustav was pretty disappointing since it fired a missile rather than a true recoilless rifle round, so deigned to make my own version for the AFP mod; the M67 90mm Recoilless Rifle of Korean/Vietnam War fame.CHANGES: I tweaked the hit value from 800 to 850 to take into account the larger diameter of the round. The simulation was switched from "shotmissile" to "shotshell" to get rid of the smoke trail. The sound of the 73mm tank gun was used instead of the weak FLOOMP of the original. The model of the round was changed to "shell" instead of "LAW" and finally, the round's init speed was changed to the M67's real world muzzle velocity of 213 m/s. The model itself is a BIS Carl Gustav with its front end lengthened while the rear flanging has been shortened. It's not exact, but it won't be confused with the CG anytime soon. RESULT: It looks and feels great, but still missing several elements like large backblast and whatnot. Is it possible to put in a tank-like blast behind the launcher? PROBLEM: Even with the range values untweaked, AI using the M67 move within 180 meters before engaging armored targets. I tried switching it back to shotmissile but the problem persists. Anyone have any idea what I did wrong? I'd rather not change the muzzle velocity back to the painfully slow vanilla. here's a copy of the config class AFP_M67Mag: CarlGustav { displayName ="90mm M67 Shell"; displayNameMagazine ="90mm M67 Shell"; shortNameMagazine ="90mm Shell"; hit=850; model="shell"; simulation="shotshell"; sound[] = {Weapons\gun73,db+20,1}; reloadMagazineSound[] = {Weapons\reload,db+20,1}; soundHit[]={"Explosions\explosion_large1",100.0000076,1}; soundFly[]={"objects\bulletnoise",0.0316228,4}; initSpeed=213; }; class AFP_M67Launcher:CarlGustavLauncher { model="\afp\m67\m67.p3d"; modelSpecial="\afp\m67\m67.p3d"; modelOptics="optika_CarlGustav"; ammo="AFP_M67Mag"; displayName="M67 Recoilless Rifle"; displayNameMagazine="90mm RR"; shortNameMagazine="90mm RR"; magazines[]={"AFP_M67Mag"}; }; Try using "shotRocket" instead of "shotshell" otherwise look at the LAW settings the two weapons functions alike in reality as fare as I understand. STGN Share this post Link to post Share on other sites
sevensixtytwo 10 Posted June 30, 2012 "shotrocket" didn't work. It just gave the shell a smoke trail. I found that the the AI doesn't like to compensate for drop when firing AT weapons. They close to 180 meters because that's the range that the shell begins to drop, since the shell has no thrust, just muzzle velocity. There might not be a work around for the AI. :( Thanks anyway. Share this post Link to post Share on other sites
stgn 39 Posted June 30, 2012 What happens if you increase muzzle speed? Muzzle velocity is an avarage you can easily get away with being on the high end if it betters performance Also try playing around with the distanceZoomMin=100; distanceZoomMax=100; settings for class AFP_M67Launcher as that is the effective zero range for OFP weapons. STGN Share this post Link to post Share on other sites
sevensixtytwo 10 Posted June 30, 2012 No joy. Doubled the distancezoom to 200 but AI still closes to 180 meters before taking a shot. I found the same problem with the BW Mod (I think) Panzerfaust 3 (has low range in itself) and the Falklands Mod Carl Gustav (uses buffed RPG stats.) On a fun note: I discovered Laser's Carl Gustav had guided rockets. LOL. Share this post Link to post Share on other sites
DanAK47 1 Posted July 2, 2012 Where is the cfgAmmo section of your code? I never had this problem with my Carl Gustav. The smoke trail can be disabled when using shotMissile. Share this post Link to post Share on other sites
sevensixtytwo 10 Posted July 2, 2012 (edited) Yes, actually, the CfgAmmo was my missing segment. Stupid noob, me. xD The problem with the AI engagement range is resolved. They snipe with the RR just fine now. I had to ditch the magazine system though, in favor of simply doing the AFP_M67Launcher weapon and AFP_M67Launcher as its ammo instead of having multiple magazines. New code class CfgAmmo { class Default {}; class AT3: Default {}; class LAW:AT3 {}; class CarlGustav: AT3 {}; class AFP_M67Shell: CarlGustav { model="shell"; displayName ="90mm M67 Shell"; displayNameMagazine ="90mm M67 Shell"; shortNameMagazine ="90mm Shell"; sound[] = {Weapons\gun73,db+20,1}; reloadMagazineSound[] = {Weapons\reload,db+20,1}; soundHit[]={"Explosions\explosion_large1",100.0000076,1}; soundFly[]={"objects\bulletnoise",0.0316228,4}; maxspeed=0; thrust=0; thrusttime=0; }; }; class CfgWeapons { class Default {}; class LAWLauncher: Default {}; class RPGLauncher: LAWLauncher {}; class CarlGustavLauncher:LAWLauncher {}; class AFP_M67Launcher:CarlGustavLauncher { scopeWeapon=2; scopeMagazine=2; weaponType=16; magazineType="2 * 256"; model="\afp\m67\m67.p3d"; ammo="AFP_M67Shell" //modelSpecial="\afp\m67\m67.p3d"; modelOptics="\afp\m67\m67_optic.p3d"; displayName="M67 Recoilless Rifle"; displayNameMagazine="M67"; shortNameMagazine="M67"; initSpeed=213; opticsZoomMin=0.18; opticsZoomMax=0.18; distanceZoomMin=400; distanceZoomMax=400; }; }; I also got rid of the smoke trail when I set the thrust to 0. Now it acts like a man-portable tank gun (which is essentially what a real-life RR is.) New problem. The real-life M67 has a muzzle velocity of 213 m/s and is zeroed in at 400 meters as this sight indicates http://upload.wikimedia.org/wikipedia/commons/d/da/M67_sight_full-stadia_picture.png However, the weapon is currently zeroed in at 100 meters. I need to sight a target 200 meters away at the 600 meter mark just to hit it. Changing DistanceZoomMin/Max to 400 does nothing. Is there any other way I can tweak the optic so that the center hair is truly sighted at 400 meters? Maybe offset the optic to the weapon? AI can hit a tank 300-400 meters away at 75% chance. For now, each AT rifleman can carry 3 rounds (combat load for one RR) unless I can make an ammo-bearer unit for MP. Each round is comparably more powerful than the BIS Carl Gustav, but is unguided and gravity must be taken into account. Still don't know if a backblast is possible? Thanks for all the replies. :D Edited July 2, 2012 by sevensixtytwo Share this post Link to post Share on other sites
zulu1 145 Posted July 2, 2012 (edited) Still don't know if a backblast is possible? Thanks for all the replies. :D Sevensixtytwo, Here is a backblast script from the multiplayer community. (Thanks to Harkonin from VetSquad) backblast.sqs ;; Script By Harkonin inspired by CoC private ["_unit","_weapon","_muzzle","_mode","_ammo","_blastweapon"]; private ["_Rocket", "_proceed", "_alpha1", "_alpha2", "_alpha3", "_alphaArr", "_LaunchTubForeArr"]; private ["_puffTTL", "_flashTTL", "_particleSizeArray", "_PuffWeight"]; ; ; From the fired event ; _unit = _this select 0; _weapon=_this select 1; _muzzle=_this select 2; _mode=_this select 3; _ammo=_this select 4; ; ; The extra parameter, the weapon for which we want a backblast ; _blastweapon=_this select 5; ; ; Blast effect will originate from the position of the firing unit (e.g. the player) ; _Rocket = _unit; ?_weapon != _blastweapon: exit; _proceed = 1; _Alpha1 = [.8, .8, .8, .9]; _Alpha2 = [.8, .8, .8, .8]; _Alpha3 = [.8, .8, .8 , 0]; _AlphaArr = [_Alpha1, _Alpha2, _Alpha2, _Alpha3]; _LaunchTubForeArr = [0,0,.85]; _puffTTL = .5; _flashTTL = .5; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0.0,-10.0,0.0], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0], 0.1,0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0.0,-8.8,4.8], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0], 0.1,0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0.0,-8.8,-4.8], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0], 0.1,0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0,-9.0,3], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0],0.1,0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0,-9.0,3], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0],0.1,0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0,-9.0,-3], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0],0.1,.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0,-9.0,-3], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0],0.1, 0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-8,0], 1, 1.09, 0.85, 0, [1,1.4],_AlphaArr,[0],0.1,0.2,"FX\Fire\BurnInit.sqs","",_Rocket]; drop ["cl_basic", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-6,0], 1, 1.09, 0.85, 0, [1,1.2],_AlphaArr,[0],0.1,0.2,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-4,0], 1, 1.09, 0.85, 0, [1,0.8],_AlphaArr,[0],0.1,0.2,"","",_Rocket]; drop ["cl_fire", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-8,0], 1, 1.09, 0.85, 0, [1,1.4],_AlphaArr,[0],0.1,0.2,"FX\Fire\BurnInit.sqs","",_Rocket]; drop ["cl_fire", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-6,0], 1, 1.09, 0.85, 0, [1,1.2],_AlphaArr,[0],0.1,0.2,"","",_Rocket]; drop ["cl_fire", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-4,0], 1, 1.09, 0.85, 0, [1,0.8],_AlphaArr,[0],0.1,0.2,"","",_Rocket]; _puffTTL = 5; _particleSizeArray = [1,2,2,2]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [ 0.0, -2.0, 0.0], 1, 1.09, 0.85, 0.1, _particleSizeArray, _AlphaArr, [0], 0.1, 0.2, "","",_rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [ 0.0, -1.8, 1.0], 1, 1.09, 0.85, 0.1, _particleSizeArray, _AlphaArr, [0], 0.1, 0.2, "","",_rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [ 0.0, -1.8, -1.0], 1, 1.09, 0.85, 0.1, _particleSizeArray, _AlphaArr, [0], 0.1, 0.2, "","",_rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [ 0, -1.8, 0.0], 1, 1.09, 0.85, 0.1, _particleSizeArray, _AlphaArr, [0], 0.1, 0.2, "","",_rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [ 0, -1.8, 0.0], 1, 1.09, 0.85, 0.1, _particleSizeArray, _AlphaArr, [0], 0.1, 0.2, "","",_rocket]; ;Flames: _man=_this select 0 _object=nearestobject [_man,"RPG"] _pos=getpos _object _lifeTime =35 _delay = 0.001 _velocity=[0,0,1] _lifeTicks = _lifeTime / _delay _lifeTick = _lifeTicks #Begin _cx=getpos _object select 0 _cy=getpos _object select 1 _cz=getpos _object select 2 _pos=getpos _object _bomb=drop ["cl_fire", "", "Billboard", 1, 2, _pos, [random 0.3, random 0.3, 0], 1, 0.004, 0.004, 0.1, [1.5*(0.1 + 0.2 * _lifeTick/_lifeTicks), 1.5*(0.1 + 0.5 * _lifeTick/_lifeTicks), 1.5*(0.1 + 0.1 * _lifeTick/_lifeTicks)], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [0,0,1,0]], [0,1,0], 0.5, 0.05, "", "", ""] _smoke=drop ["cl_basic", "", "Billboard", 1, 2, _pos, [random 0.3, random 0.3, 0], 1, 0.004, 0.004, 0.1, [1.5*(0.1 + 0.2 * _lifeTick/_lifeTicks), 1.55*(0.1 + 0.5 * _lifeTick/_lifeTicks), 1.5*(0.1 + 0.1 * _lifeTick/_lifeTicks)], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [0,0,1,0]], [0,1,0], 0.5, 0.05, "", "", ""] ~0.001*_delay ? _cz<0.5 :goto "explo" _lifeTick = _lifeTick - 1 ?_lifeTick > 0 : goto "Begin" #explo _Unit = _object _Explosion = GetPos _Unit _cx = _Explosion select 0 _cy = _Explosion select 1 _cz = _Explosion select 2 _c = 50 _color = [[0.35,0.35,0.3,0], [0.2, 0.2, 0.1, 0.5],[0.2, 0.27, 0.15, 0]] _size = [2, 5] _size1 = [2, 15] _lifetime = 2 _step = 360 / _c _i = 0 #l1 _vel = [sin(_i * _step)*15, cos(_i * _step)*15,0] _vel0 = [sin(_i * _step)*100, cos(_i * _step)*100, random 75-random 150] _vel1 = [sin(_i * _step)*15, cos(_i * _step)*15,random 15-random 30] ?_cz<1:drop ["cl_basic", "", "Billboard", _lifetime, _lifetime, [_cx, _cy, _cz], _vel, 0, 0.2, 0.157, 0.001, _size, _color, [0], 0.1, 0.2, "", "", ""] ?_cz>=1:drop ["cl_basic", "", "Billboard", _lifetime, _lifetime, [_cx, _cy, _cz], _vel1, 0, 0.2, 0.157, 0.001, [5,15,25], _color, [0], 0.1, 0.2, "", "", ""] drop ["cl_fire", "", "Billboard", 1, 0.75, [_cx, _cy, _cz], _vel0,1, 0.004, 0.004, 0.1, [random 5,random 15], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [1,1,1,0]], [0,1,0], 0.5, 0.05, "", "", ""] _i = _i + 1 ?_i < _c: goto "l1" _tempobj = objNull _pos=getpos _object _lifeTime =0.001 _delay = 0.001 _velocity=[0,0,1] _lifeTicks = _lifeTime / _delay _lifeTick = _lifeTicks #Begin0 drop ["cl_basic", "", "Billboard", 1, 1, [_cx,_cy,_cz], [random 0.3, random 0.3, random 0.3], 1, 0.004, 0.004, 0.1, [5*(0.1 + 0.2 * _lifeTick/_lifeTicks), 2.5*(0.1 + 0.5 * _lifeTick/_lifeTicks), 2.5*(0.1 + 0.1 * _lifeTick/_lifeTicks)], [[0,0,0,1], [0,0,0,1], [0,0,0,1], [0,0,0,1]], [0,1,0], 0.5, 0.05, "", "", ""] drop ["cl_fire", "", "Billboard", 1, 1, [_cx,_cy,_cz], [random 0.3, random 0.3, random 0.3], 1, 0.004, 0.004, 0.1, [75*(0.1 + 0.2 * _lifeTick/_lifeTicks), 25*(0.1 + 0.5 * _lifeTick/_lifeTicks), 25*(0.1 + 0.1 * _lifeTick/_lifeTicks)], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [1,1,1,0]], [0,1,0], 0.5, 0.05, "", "", ""] ~_delay _object setdammage _i _i=_i*1.1 _lifeTick = _lifeTick - 1 ?_lifeTick > 0 : goto "Begin0" exit It's activated in missions by an eventhandler like this: this addEventHandler["fired",{(_this + ["RPGLauncher"]) exec "Effects\Units\BackBlast.sqs"}]; You should be able to work this into your addon. Edited July 2, 2012 by Zulu1 Share this post Link to post Share on other sites
DanAK47 1 Posted July 2, 2012 I had to ditch the magazine system though I don't think this is your problem. This is (was) probably the problem: class AFP_M67Mag: CarlGustav Try inheriting from CarlGustavLauncher and not CarlGustav. As far as zeroing the weapon, you will have to alter the size of the reticle and the zoom in the config until things match up. It's probably better to create the reticle based off some shooting in the editor as opposed to trying to make the config match the reticle. Share this post Link to post Share on other sites
sevensixtytwo 10 Posted July 3, 2012 (edited) @DanAK47: I took your advice and screwed around with the optic instead of the config. Works sort of fine now, if not very realistic. You can even approximate the distance of a tank using the stadiametric rangefinder up to around 500 meters, though accuracy may vary depending on the size of the tank (used a T72 as a guide.) I can hit tanks often on the first shot, and if I miss, the second always hits. Problem now. I don't know why, but the AI now fires too high unlike before. Might be I screwed something up while fixing the optics. @Zulu1: Great! This is just what I needed! Much thanks. I'll have to try it out tonight. By the way, would I be able to call the script from the weapon's config? or from the AT Rifleman? Edit: Just tried it out in a mission. Worked, but the blast came out from the soldier's arse. Still, a big step ahead, no? Edited July 3, 2012 by sevensixtytwo Share this post Link to post Share on other sites
Macser_old 0 Posted July 3, 2012 I'm assuming you already understand what Zulu mentioned and wanted to "embed" the effect. Rather than enter it into a unit's init field. You could run the script off a fired eventhandler in a unit's Cfg,with a check for your custom weapon. To ensure it only executes with that in particular. class EventHandlers { fired="if ((_this select 1) == ""YourWeaponClassName"") Then {[_this select 0] exec {\Blah\Blah\Whatever.sqs}}"; }; }; Someone may come up with a more elegant solution.But in the meantime that should work. :) Share this post Link to post Share on other sites
sevensixtytwo 10 Posted July 3, 2012 (edited) @Macser: Ah, so if I put the "fired" into my SolBase unit (which all my units inherit) any of them could pick up an M67 RR and have backblast? I'll test it right now. EDIT: It works perfectly, though it gives a Error Zero Divisor note on top of the screen everytime someone fires. Much thanks! Oh and the reason for the backblast coming out of the trooper ass was the WW4 mod since the default stance of the soldier is now standing instead of kneeling. Might do an anim tweak for that. Edited July 3, 2012 by sevensixtytwo Share this post Link to post Share on other sites
ProfTournesol 956 Posted July 3, 2012 EDIT: It works perfectly, though it gives a Error Zero Divisor note on top of the screen everytime someone fires. Post the script here if you want. Share this post Link to post Share on other sites
sevensixtytwo 10 Posted July 3, 2012 @ProfTournesol The script I used was exactly what Zulu1 posted. I made no changes. ;; Script By Harkonin inspired by CoC private ["_unit","_weapon","_muzzle","_mode","_ammo","_blas tweapon"]; private ["_Rocket", "_proceed", "_alpha1", "_alpha2", "_alpha3", "_alphaArr", "_LaunchTubForeArr"]; private ["_puffTTL", "_flashTTL", "_particleSizeArray", "_PuffWeight"]; ; ; From the fired event ; _unit = _this select 0; _weapon=_this select 1; _muzzle=_this select 2; _mode=_this select 3; _ammo=_this select 4; ; ; The extra parameter, the weapon for which we want a backblast ; _blastweapon=_this select 5; ; ; Blast effect will originate from the position of the firing unit (e.g. the player) ; _Rocket = _unit; ?_weapon != _blastweapon: exit; _proceed = 1; _Alpha1 = [.8, .8, .8, .9]; _Alpha2 = [.8, .8, .8, .8]; _Alpha3 = [.8, .8, .8 , 0]; _AlphaArr = [_Alpha1, _Alpha2, _Alpha2, _Alpha3]; _LaunchTubForeArr = [0,0,.85]; _puffTTL = .5; _flashTTL = .5; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0.0,-10.0,0.0], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0], 0.1,0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0.0,-8.8,4.8], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0], 0.1,0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0.0,-8.8,-4.8], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0], 0.1,0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0,-9.0,3], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0],0.1,0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0,-9.0,3], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0],0.1,0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0,-9.0,-3], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0],0.1,.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [0,-9.0,-3], 1, 1.09, 0.85, 0,[1,1],_AlphaArr,[0],0.1, 0.4,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-8,0], 1, 1.09, 0.85, 0, [1,1.4],_AlphaArr,[0],0.1,0.2,"FX\Fire\BurnInit.sqs","",_Rocket]; drop ["cl_basic", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-6,0], 1, 1.09, 0.85, 0, [1,1.2],_AlphaArr,[0],0.1,0.2,"","",_Rocket]; drop ["cl_basic", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-4,0], 1, 1.09, 0.85, 0, [1,0.8],_AlphaArr,[0],0.1,0.2,"","",_Rocket]; drop ["cl_fire", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-8,0], 1, 1.09, 0.85, 0, [1,1.4],_AlphaArr,[0],0.1,0.2,"FX\Fire\BurnInit.sqs","",_Rocket]; drop ["cl_fire", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-6,0], 1, 1.09, 0.85, 0, [1,1.2],_AlphaArr,[0],0.1,0.2,"","",_Rocket]; drop ["cl_fire", "", "Billboard", 20, _flashTTL, _LaunchTubForeArr, [ 0.00,-4,0], 1, 1.09, 0.85, 0, [1,0.8],_AlphaArr,[0],0.1,0.2,"","",_Rocket]; _puffTTL = 5; _particleSizeArray = [1,2,2,2]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [ 0.0, -2.0, 0.0], 1, 1.09, 0.85, 0.1, _particleSizeArray, _AlphaArr, [0], 0.1, 0.2, "","",_rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [ 0.0, -1.8, 1.0], 1, 1.09, 0.85, 0.1, _particleSizeArray, _AlphaArr, [0], 0.1, 0.2, "","",_rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [ 0.0, -1.8, -1.0], 1, 1.09, 0.85, 0.1, _particleSizeArray, _AlphaArr, [0], 0.1, 0.2, "","",_rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [ 0, -1.8, 0.0], 1, 1.09, 0.85, 0.1, _particleSizeArray, _AlphaArr, [0], 0.1, 0.2, "","",_rocket]; drop ["cl_basic", "", "Billboard", 61, _puffTTL, _LaunchTubForeArr, [ 0, -1.8, 0.0], 1, 1.09, 0.85, 0.1, _particleSizeArray, _AlphaArr, [0], 0.1, 0.2, "","",_rocket]; ;Flames: _man=_this select 0 _object=nearestobject [_man,"RPG"] _pos=getpos _object _lifeTime =35 _delay = 0.001 _velocity=[0,0,1] _lifeTicks = _lifeTime / _delay _lifeTick = _lifeTicks #Begin _cx=getpos _object select 0 _cy=getpos _object select 1 _cz=getpos _object select 2 _pos=getpos _object _bomb=drop ["cl_fire", "", "Billboard", 1, 2, _pos, [random 0.3, random 0.3, 0], 1, 0.004, 0.004, 0.1, [1.5*(0.1 + 0.2 * _lifeTick/_lifeTicks), 1.5*(0.1 + 0.5 * _lifeTick/_lifeTicks), 1.5*(0.1 + 0.1 * _lifeTick/_lifeTicks)], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [0,0,1,0]], [0,1,0], 0.5, 0.05, "", "", ""] _smoke=drop ["cl_basic", "", "Billboard", 1, 2, _pos, [random 0.3, random 0.3, 0], 1, 0.004, 0.004, 0.1, [1.5*(0.1 + 0.2 * _lifeTick/_lifeTicks), 1.55*(0.1 + 0.5 * _lifeTick/_lifeTicks), 1.5*(0.1 + 0.1 * _lifeTick/_lifeTicks)], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [0,0,1,0]], [0,1,0], 0.5, 0.05, "", "", ""] ~0.001*_delay ? _cz<0.5 :goto "explo" _lifeTick = _lifeTick - 1 ?_lifeTick > 0 : goto "Begin" #explo _Unit = _object _Explosion = GetPos _Unit _cx = _Explosion select 0 _cy = _Explosion select 1 _cz = _Explosion select 2 _c = 50 _color = [[0.35,0.35,0.3,0], [0.2, 0.2, 0.1, 0.5],[0.2, 0.27, 0.15, 0]] _size = [2, 5] _size1 = [2, 15] _lifetime = 2 _step = 360 / _c _i = 0 #l1 _vel = [sin(_i * _step)*15, cos(_i * _step)*15,0] _vel0 = [sin(_i * _step)*100, cos(_i * _step)*100, random 75-random 150] _vel1 = [sin(_i * _step)*15, cos(_i * _step)*15,random 15-random 30] ?_cz<1:drop ["cl_basic", "", "Billboard", _lifetime, _lifetime, [_cx, _cy, _cz], _vel, 0, 0.2, 0.157, 0.001, _size, _color, [0], 0.1, 0.2, "", "", ""] ?_cz>=1:drop ["cl_basic", "", "Billboard", _lifetime, _lifetime, [_cx, _cy, _cz], _vel1, 0, 0.2, 0.157, 0.001, [5,15,25], _color, [0], 0.1, 0.2, "", "", ""] drop ["cl_fire", "", "Billboard", 1, 0.75, [_cx, _cy, _cz], _vel0,1, 0.004, 0.004, 0.1, [random 5,random 15], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [1,1,1,0]], [0,1,0], 0.5, 0.05, "", "", ""] _i = _i + 1 ?_i < _c: goto "l1" _tempobj = objNull _pos=getpos _object _lifeTime =0.001 _delay = 0.001 _velocity=[0,0,1] _lifeTicks = _lifeTime / _delay _lifeTick = _lifeTicks #Begin0 drop ["cl_basic", "", "Billboard", 1, 1, [_cx,_cy,_cz], [random 0.3, random 0.3, random 0.3], 1, 0.004, 0.004, 0.1, [5*(0.1 + 0.2 * _lifeTick/_lifeTicks), 2.5*(0.1 + 0.5 * _lifeTick/_lifeTicks), 2.5*(0.1 + 0.1 * _lifeTick/_lifeTicks)], [[0,0,0,1], [0,0,0,1], [0,0,0,1], [0,0,0,1]], [0,1,0], 0.5, 0.05, "", "", ""] drop ["cl_fire", "", "Billboard", 1, 1, [_cx,_cy,_cz], [random 0.3, random 0.3, random 0.3], 1, 0.004, 0.004, 0.1, [75*(0.1 + 0.2 * _lifeTick/_lifeTicks), 25*(0.1 + 0.5 * _lifeTick/_lifeTicks), 25*(0.1 + 0.1 * _lifeTick/_lifeTicks)], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [1,1,1,0]], [0,1,0], 0.5, 0.05, "", "", ""] ~_delay _object setdammage _i _i=_i*1.1 _lifeTick = _lifeTick - 1 ?_lifeTick > 0 : goto "Begin0" exit And I put the lines Macser posted in the EH config of all my units as such. fired="if ((_this select 1) == ""AFP_M67Launcher"") Then {[_this select 0] exec {\afp\backblast.sqs}}"; Here be a screenie of the error. http://i234.photobucket.com/albums/ee277/thefirewarriors/dxdshot1341333101.png Share this post Link to post Share on other sites
ProfTournesol 956 Posted July 3, 2012 Yup, so the way the script is launched (if this is the good weapon, then blabla), you can delete those lines IMO : _blastweapon=_this select 5; and ?_weapon != _blastweapon: exit; Share this post Link to post Share on other sites
sevensixtytwo 10 Posted July 3, 2012 @ProfTournesol: That took care of it. I also had to comment out several other lines _muzzle=_this select 2; _mode=_this select 3; _ammo=_this select 4; They were also causing errors. I appreciate the help, sir. :) Share this post Link to post Share on other sites