Home   Help Search Login Register  

Author Topic: ArmA Turret definitions  (Read 3701 times)

0 Members and 1 Guest are viewing this topic.

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
ArmA Turret definitions
« on: 11 Feb 2007, 05:03:28 »
RE: ArmA Turret definitions for new addons
Has anyone got *any* turret to work using our existing tools and the new turret definitions (that we know of) ?

All my turrets are locked forward and fire straight ahead.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: ArmA Turret definitions
« Reply #1 on: 11 Feb 2007, 13:39:46 »
Ummm yes, basically it goes something like this....

Lets suppose you are doing a ship.....a good guess maybe  :D.

Firstly your config has to declare the turret frameworks for the class.

Code: [Select]
class All;
Class AllVehicles: All {};
class Ship: AllVehicles{};
class SmallShip: Ship{};
 {
  class NewTurret;
  class Turrets;
 };

Then for your own ship in the config you would include the turret definition for it.

For example


Code: [Select]
class BoatW: SmallShip
{
  scope = 2;
  displayName = "MyBoatWithTurret";
  blah...
  blah...
    class Turrets: Turrets
  {
   class MainTurret: NewTurret
   {
    body = "MainTurret";
    gun = "MainGun";
    animationSourceBody = "mainTurret";
    animationSourceGun = "mainGun";
    gunnerAction = "RHIB_Gunner";
    castGunnerShadow = 1;
    ejectDeadGunner = 1;
    outGunnerMayFire = 1;
    inGunnerMayFire = 0;
    minElev = -25;
    maxElev = 60;
    initElev = 5;
    minTurn = -135;
    maxTurn = 135;
    initTurn = 0;
    soundServo[] = {"",0.010000,1.000000};
    gunBeg = "usti hlavne";
    gunEnd = "konec hlavne";
    weapons[] = {"AReallyBigGun"};
    magazines[] = {"VerBigDDamagingShells"};
    gunnerName = "Trigger Happy Fred";
    gunnerOpticsModel = "\ca\weapons\optika_empty";
    showgunneroptics = 1;
    gunnerForceOptics = 0;
    startEngine = 0;
    class ViewOptics
    {
     initAngleX = 0;
     minAngleX = -30;
     maxAngleX = 30;
     initAngleY = 0;
     minAngleY = -100;
     maxAngleY = 100;
     initFov = 0.600000;
     minFov = 0.600000;
     maxFov = 0.600000;
    };
    class ViewGunner
    {
     initAngleX = 5;
     minAngleX = -30;
     maxAngleX = 30;
     initAngleY = 0;
     minAngleY = 0;
     maxAngleY = 0;
     initFov = 0.700000;
     minFov = 0.600000;
     maxFov = 0.700000;
    };
   };
  };
  Any more blah...
  Extra blah...
};

Remember the values used are just an example, you can of course use your own.
Hopefully it will work for you, although proxy positions might be a pain.


Planck
I know a little about a lot, and a lot about a little.

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: ArmA Turret definitions
« Reply #2 on: 11 Feb 2007, 14:15:19 »
Ok, thanks Planck, but it wasnt so much the CONFIG I was concerned about, it was the named turret points and sections it the model ....... do they work too, defined the old ofp way ?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: ArmA Turret definitions
« Reply #3 on: 12 Feb 2007, 00:04:41 »
As far as I know the selection points in the turrets still work for the most part, however many OFP version .p3d's don't see to work or throw up an error, something about version 7 ....blah blah.


Planck
I know a little about a lot, and a lot about a little.

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: ArmA Turret definitions
« Reply #4 on: 16 Feb 2007, 14:54:23 »
well, I can get the p3d's to work no problem, but the memory point and body/barrel definitions don't seem to work.
Although bullets are coming from the right place on the barrel, so those point definitions work ....... but no matter what I definite the axis points or the body and barrel as, turret won't rotate or elevate the barrel ......... stuck forward solid. :(

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: ArmA Turret definitions
« Reply #5 on: 16 Feb 2007, 21:45:26 »
Trust me, the above layout for the config does work, as long as your selections are named correctly in the model.

the points in the above config being:

    body = "MainTurret";
    gun = "MainGun";

and

    gunBeg = "usti hlavne";
    gunEnd = "konec hlavne";

However I was using an Elite .p3d.

I know this works because it worked for me, the only sticking point might be the proxy positions for crew.


Planck
I know a little about a lot, and a lot about a little.