Home   Help Search Login Register  

Author Topic: Turret Dilemma?  (Read 1450 times)

0 Members and 1 Guest are viewing this topic.

Offline Nixer6

  • Members
  • *
Turret Dilemma?
« on: 29 Jan 2008, 19:41:18 »
I am attempting to make a modified AH-6 addon. Most weapons that I want I can just change the

weapons{} line in the config. I would like to add a MK19. It shows up in the weapons selection in the bird, but it won't fire. So I assumed (scary) that it was a turret only weapon, and I tried to add a turret to the config....

I didn't get any errors on loading the game or when selecting my test mission, but when I tried to play the mission I CTD'd so hard that my desktop was all messed up!  :dunno:

1. Does anyone know why the MK19 wont fire in the bird"

2. Is it possible to make a turret for the "gunner" in the AH6 without changing the model...just in the config??

Thanks for any help at all.
Why do I have to be a Rocket Scientist to make a good mission?

Offline Sparky

  • Former Staff
  • ****
    • Hellenic Warfare Mod
Re: Turret Dilemma?
« Reply #1 on: 30 Jan 2008, 22:29:56 »
I don't know much about armored helicopters since i haven't work with them yet, but i do know about tanks, so i think it will be somehow the same.
1)In CfgVehicles In weapons array, you should have independent weapons. with their appropriate magazines
example from HWM Leopard
weapons[] = {"L7A3","MG3_coax"};      
magazines[] = {"40Rnd_105mmHEAT","15Rnd_105APDS","5000XMG3_762"};

2)Each weapon with the appropriate magazine is defined to CfgWeapons and CfgMagazines
class L7A3 : CannonCore {
      access = ReadOnly;
      scope = public;
      primary = 10;
      displayName = L7A3;
      sound[] = {"\ca\Weapons\Data\Sound\gun120", db50, 1};
      reloadSound[] = {"\ca\Weapons\Data\Sound\gun120reload", 1.0, 1};
      magazines[] = {"40Rnd_105mmHEAT", "15Rnd_105APDS"};
      minRange = 1;
      minRangeProbab = 0.1;
      midRange = 1000;
      midRangeProbab = 0.7;
      maxRange = 1345;
      maxRangeProbab = 0.1;
      reloadTime = 7;
      magazineReloadTime = 9;
      maxLeadSpeed = 100;   // max estimated speed km/h
      autoReload = true;
      recoil = "L7A3Recoil";
   };

take notice that the base class is important cause through this you can have the simulation type, so cannoncore class is for tank cannons
also in this example you have 2 different types of magazines (drop down selectio in game)

3)as for the magazines.

class 40Rnd_105mmHEAT : HWM_VehicleMagazine {
      scope = protected;
      displayName = HEAT;
      ammo = 105_HEAT;
      count = 40;
      initSpeed = 1173;
   };
   
   class 15Rnd_105APDS : HWM_VehicleMagazine {
      scope = protected;
      displayName = APDS;
      ammo = 105_APDS;
      count = 15;
      initSpeed = 1345;
   };

3)also ammo is neede to be defines in CfgAmmo
class 105_HEAT : ShellBase {
      hit = 650;
      indirectHit = 0;
      indirectHitRange = 0;
      typicalSpeed = 1173;
      explosive = 0.8;
      cost = 1000;
      model = "\ca\Weapons\shell";
   };
   
   class 105_APDS : ShellBase {
      hit = 500;
      indirectHit = 0;
      indirectHitRange = "";
      typicalSpeed = 1345;
      cost = 1000;
      deflecting = 15;
      model = "\ca\Weapons\shell";
   };

base class here is too important cause it configures the simulation type, that has too do with physics and generally it's BIS hardcoded and cannot be changed.

5)Now as far as the tuurets, i don't know if you can do much, i never tried it, but i don't know if you can have weapons outside of a turret and inside of the turret. besically for start try to add your turret, and remove the weapons[] and magazines[] array inside the turret class.


Offline Nixer6

  • Members
  • *
Re: Turret Dilemma?
« Reply #2 on: 31 Jan 2008, 02:38:48 »
Thanks for the reply. I am just starting to play around with configs.

The base class that I am inheriting from is helicopter, Your point about hard coded stuff makes sense. The AH6 is awful small for BIS to have considered putting a large weapon on the littlebird. I have read they do use them though. I would guess that placing a turret also has to relate to some point in the model....I know even less about modeling than config writing. The latest real life versions I have seen have an all new digital avionics cockpit, 19 round M261 pods, a single M134 7.62 minigun and a .50 cal 3 barrel mingun. Lot's of it is probably classified so not much open source stuff out there.

I think I will just have to content myself with a little config mod that reflects those changes and also some upgraded armor and glass, also true IRL. It's got a bigger engine now too, to haul all that weight.

I guess I was just hoping I could create some kind of proxy turret, no outside animations, and a "paper" gun. No luck so far. The MK19 is mgun class, same as the M134. I can get the bird to "think" it's there, no errors or such. It shows up in the weapons selection ingame. It just won't fire. Creating a turret in the config CTD's me everytime. I am doing it correctly, just copying the cobra's turret config. Like I said no error's, But when I try to place the aircraft in the editor..BANG! CTD!

I am able to place an M198 on the bird...the MK19 just won't work.
Why do I have to be a Rocket Scientist to make a good mission?