Baron von Beer 0 Posted October 5, 2003 1st: Is it possible to get existing static MG emplacements to fire at aircraft? (Example. Inv. 44 mod static MG42 fire at C47, P51, etc). They don't seem to do it of their own accord, so is there a way to persuade them? I suspect not. So... 2n: what values of a target (or is it firer? I was told the target is what matters with a/c) would make static MGs fire upon them? I would really like to be able to make this happen. I am adapting Snypir's SP Pack to WW2. P51s and corsairs for airstrikes/CAS, Ju52s and C47s for supply and paradrop, etc. Since AAA options are limited (And I don't want everything getting blasted out of the sky) I would like to be able to get the existing MG emplacements to serve this role. Not only to offer some resistance to the air, but also for the atmosphere it adds. Seeing an aircraft taking misc ground fire as it passed by. (I have been doing reading on unit making (toying with the idea of doing one, so been learning a little...) Thanks for any answers (**And if values are to be changed, I do intend to ask permission beforehand, and NOT distribute it afterwards... just looking to be able to have em shot at in my game.**) Share this post Link to post Share on other sites
BraTTy 0 Posted October 5, 2003 The ammo needs to be config'd with: airlock=1; or airlock= true; In order for the weapon to engage air targets (also needs a hit greater than 8) Bis M2 Mgun engages air targets well,but you could also define your own weapon/ammo and add it to the Inv44 Mgun without touching their addon Share this post Link to post Share on other sites
Baron von Beer 0 Posted October 7, 2003 Thanks for the help! now if I could have a little more... You say define a new weapon/ammo... I must claim ignorance on how to do this. I know each addon has it's config which defines the "unit" weapons, and ammo types, etc. Would I make a "new" config that references said addons, but defines a new weapon & or ammo, using the original model? If so, would a lone config file in the addons folder work? (never done it as you can see from my "vast" knowledge. ) Thanks again for your help. Share this post Link to post Share on other sites
BraTTy 0 Posted October 9, 2003 Yes just like you said,just a config file in a folder defining a new weapon and a new ammo.But of course you pbo it up just like a addon.A new weapon for a turret uses the turret model, defining your own weapon & ammo will automatically use the turret points from the vehicle (m2 type mgun is still a vehicle) that the weapon and ammo is added. Then when you load the mg in mission editor you would want to remove the mg's original weapons and add your weapons to the mg removeallweapons this , this addweapon Brt_Mgun etc.... Heres some to give you a start (excerpt with name changes from my A6M2 Zero) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> // some basic defines #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define true 1 #define false 0 // type scope #define private 0 #define protected 1 #define public 2 class CfgPatches { class Brt_Mgun { units[] = {""}; weapons[] = {"Brt_Mgun"}; requiredVersion = 1.90; }; }; class cfgammo { Â Â Â Â Â Â Â Â class Default {}; Â Â Â Â class AT3: Default {}; Â Â Â Â Â Â Â Â class Mgun:Default {}; Â Â Â Â class Hellfire: AT3 {}; Â Â Â Â class CarlGustav: AT3 {}; Â Â Â Â class Bullet7_6 : Default {}; Â Â Â Â Â Â Â Â class Brt_Mgun : Bullet7_6 // machine gun bullet { airLock=true; Â Â Â Â Â Â Â Â explosive = false; hit=34;indirectHit=17;indirectHitRange=2; minRange=10;minRangeProbab=0.99; midRange=300;midRangeProbab=0.97; maxRange=500;maxRangeProbab=0.96; Â Â Â Â Â Â Â Â multiplier=1; cost=16; }; Â Â Â Â Â }; class cfgweapons { Â Â Â Â Â Â Â Â class Default {}; Â Â Â Â class MGun: Default {}; Â Â Â Â class MachineGun7_6: MGun {}; Â Â Â Â Â Â Â Â class Brt_Mgun : MachineGun7_6 { //-- scopeWeapon = public; scopeMagazine = public; Â Â Â Â Â Â Â Â enableAttack=true; Â Â Â Â Â Â Â Â displayName= "20mm"; Â Â Â Â Â Â Â Â soundcontinuous=1; ammo=Brt_Mgun; Â Â Â Â Â Â Â Â showEmpty = true; count=1000; reloadTime=0.09; reloadSound[]={,1,1}; //sound[]={"\Brt_Mgun\gun1.wav",db60,1}; initSpeed=900; dispersion=0.003; maxLeadSpeed=800; // max estimated speed km/h aiDispersionCoefX=10; // dispersion used to simulate horizontal burst aiDispersionCoefY=15; Â Â Â Â Â Â Â Â ffMagnitude=0.5; ffFrequency=11; Â Â Â Â Â Â Â Â ffCount=6; aiRateOfFire=.001; // delay between shots at given distance aiRateOfFireDistance=1400; // at shorter distance delay goes lineary to zero autoFire = true; Â Â Â Â Â Â Â Â canLock=0; optics = 0; }; Â Â Â Â Â Â Â Â }; With that naming,put the config.cpp in a folder named Brt_Mgun but change to your needs and compile it up to a pbo file and put it in your addons directory edit : added more Share this post Link to post Share on other sites
Baron von Beer 0 Posted October 10, 2003 Edit** Ok, I tried it out, and it sort of worked. The MGs will now fire on *select* A/c. I tried them on a wide variety: Most BIS aircraft, Some addons: AIAs P51s, the C47, Ju52 (trenchfeet's IIRC) OV10, and SEB Nam Hueys (all types) They fired on the P51, and the Hueys only. Everything else they just watched fly around, over and over. Funny thing was, the original BIS M2hb did the same, even to BIS AH64, UH60, MI 17 & 24 Im wondering if maybee something in the units settings is also at play? Well, at least they'll shoot the P51s, which was 1 of my main goals, so it is a start. Would be nice to figure out to get the rest, so I can apply that to other MGs to shoot at the JU52s, etc. Thanks again for the help thus far, I really do appreciate it! Share this post Link to post Share on other sites
BraTTy 0 Posted October 10, 2003 It must have shot at the Corsairs also? Yes defines within the addon also count, //threat[] VSoft, VArmor, VAir threat[]={1, 1, 1}; Armor and Cost also determine which will be shot at first It will be hard to redefine all the planes and such unfortunately.The Ju52 is unarmed and I couldn't get my planes to shoot at it in earlier tests Share this post Link to post Share on other sites
Baron von Beer 0 Posted October 11, 2003 Yeah, forgot to mention the Corsair. 8 MG42s knocked it down before the pilot could blink. Oh well, guess you can't have it all. I just thought since the ZU-23s and Wirblwind were firing on the Ju-52 and C47s, MGs may be able to be "encouraged" to do the same. At least I learned something, and got half of my goal achieved, thanks to your help. Share this post Link to post Share on other sites
SelectThis 0 Posted October 11, 2003 Setting the accuracy of a unit to around 5 or over can sometimes help making it targetable by AI machinegunners. (That's how I did it for the Nam Pack Hueys) SelectThis Share this post Link to post Share on other sites
BraTTy 0 Posted October 11, 2003 Mr SelectThis sir... could you help me on this one? http://www.flashpoint1985.com/cgi-bin....t=34279 And back on topic..its possible acurracy is related to engagement like SelectThis was saying,I think maybe the unitt skill setting the editor prolly helps too Miles Teg (prolly doesn't read this part of forums) knows well of engagement too He was saying he got enemies to engage the Ju52 by switching the pilot i believe, so maybe the skill level of the pilot does help Share this post Link to post Share on other sites
BraTTy 0 Posted October 12, 2003 I just thought since the ZU-23s and Wirblwind were firing on the Ju-52 and C47s, Ahh so those were firing on the Ju and C47, I know the Ju52 has armor 100 Like I said earlier...the ammo has to have a hit greater than 8 to shoot at planes which also includes lighter armored vehciles. Apprantly with 100 armor...the weapons need to be stronger than the 20mm range hitpoints I showed in the config Share this post Link to post Share on other sites
Baron von Beer 0 Posted October 12, 2003 Ahh, the mystery of all those numbers in a units config. I must say, I was somewhat perplexed by them all, especially with how many places into a decimal some go! I am assuming the accuracy you speak of is for the *target* unit? And, when you say skill, is this a "config" setting, or do you mean the simple skill slider in the editor? (Think I had it at max, but could well have been changed with all the placing and copy pasting I did. (also as I understand, you are refering to the targets "skill") I had gunners at full skill on the slider in the editor. I won't be offended at this point if you point to the horizon to distract me, and quickly scurry off into the woods, never to return..... Again, thanks for taking the time to help me out.. been a good learning experience thus far! As of late, I have been trying to learn all I can about this kinda stuff, to hopefully apply it in the near future. Share this post Link to post Share on other sites