Home   Help Search Login Register  

Author Topic: config and more.help needed  (Read 1665 times)

0 Members and 1 Guest are viewing this topic.

MRsteve

  • Guest
config and more.help needed
« on: 05 Mar 2005, 14:57:19 »
Hi all
        I've spent three days trying to config my model, a bunker with a 47mm turret for a project. See more at      http://www.freewebs.com/ofp-screens/

The model in question is the last two images on the page.

I can get it in game and enter the position, however I cant fire and the turret axis seem really off. Im confident I have set my points up correctly in 02, (do points face different direction?)

Why does my bunker hover 1 metre above ground, although it is placed on ground plane in O2?  Not enough mass?

Also please see my config for any other issues.

Thanks ever so much for any help, once I've cracked the turret I can complete my defence bunkers and start on some ideas I've going to implement...more to come.

Cheers
Steve

http://www.freewebs.com/ofp-screens/



// 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

#define WeaponNoSlot 0// dummy weapons
#define WeaponSlotPrimary 1// primary weapons
#define WeaponSlotSecondary 16// secondary weapons
#define WeaponSlotItem 256// items
#define WeaponSlotBinocular 4096// binocular
#define WeaponHardMounted 65536


#define CanSeeRadar 1
#define CanSeeRye 2
#define CanSeeOptics 4
#define CanSeeEar 8
#define CanSeeCompass 16
#define CanSeeRadarC CanSeeRadar+CanSeeCompass
#define CanSeeAll 31

class CfgPatches
{
   class mrs_tanktobruk
   {
      units[] = {mrs_tanktobruk};
      weapons[] = {mrs_tanktobruk};
      requiredVersion = 1.75;
   };
};

class CfgAmmo
{
   class mrs_tanktobruk
   {
      ammo=Gun102;
                explosive=1;
      requiredVersion = 1.75;
   };
};

class CfgWeapons
{
   class Default{};
   class MGun: Default{};
   class MachineGun7_6: MGun{};
   class MachineGun12_7: MachineGun7_6{};
   class Gun102: MachineGun12_7{};
   class mrs_tanktobruk: Gun102
       

   {
         ammo=Gun102
                   burst=1;
                   initSpeed=100;
                   displayName="47mm Shell";
         displayNameMagazine="47mm Shell";
         shortNameMagazine="47mm Shell";
         count=60;
         reloadTime=0.100000;
         sound[]={"\mrs_tanktobruk\SHOT3.wav",db0,1};
                   soundContinuous=0;
         maxLeadSpeed=865;


      aiRateOfFire=0.5; // delay between shots at given

distance
      aiRateOfFireDistance=1000; // at shorter distance delay

goes lineary to zero
   };

};

class CfgVehicles
{
   class All{};
   class AllVehicles:All{};
   class Land: AllVehicles{};
   class LandVehicle: Land{};
   class Tank: LandVehicle{};  
   class APC: Tank{};
   class M113:APC{};
   class M2StaticMG: M113{};
   class mrs_tanktobruk: M2StaticMG
   {
         displayName="R58c Tobruk with Renault turret";
                   gunnerOpticsModel = "optika_empty";
                   getInRadius=4.000000;
                   armorStructural=1.0;
                   picture="im113";
                   ejectDeadGunner=1;
                   model="\mrs_tanktobruk\mrs_tanktobruk.p3d";
         cost=13000;
                   armor=100
         weapons[]={"mrs_tanktobruk"};
         magazines[]={"mrs_tanktobruk","mrs_tanktobruk"};
   };
};

class CfgNonAIVehicles
{
   class ProxyWeapon{};
   class ProxyMaxim_MG: ProxyWeapon{};
};

class TurretBase
      {
         gunAxis="osa hlavne";
         turretAxis="osa veze";
         gunBeg="usti hlavne";
         gunEnd="konec hlavne";
         

soundServo[]={"Vehicles\gun_elevate",0.001000,1.000000};
         minElev=-5;
         maxElev=30;
         minTurn=-60;
         maxTurn=60;
         body="OtocVez";
         gun="OtocHlaven";
};





« Last Edit: 05 Mar 2005, 15:01:54 by MRsteve »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:config and more.help needed
« Reply #1 on: 05 Mar 2005, 15:24:26 »
Not an expert or anything here, but I think the Turretbase class should be defined in the cfgVehicles section as a subclass of the model.

Look at the commented configs from BIS, in particular the config entry for the M2 or M113.

EDIT:  I also note you have no cfgModels section

Planck
« Last Edit: 05 Mar 2005, 15:28:52 by Planck »
I know a little about a lot, and a lot about a little.

MRsteve

  • Guest
Re:config and more.help needed
« Reply #2 on: 05 Mar 2005, 16:35:30 »
Thanks for the response Im looking at the commented configs now, but I just really cant get my head round it.

Is it possible you could explain a little more? Code snippet?   All I've been able to do is patch other peoples configs together, with, as you have seen, very little success  :-(

Believe me I have read all of the available tutorials etc, it just hasnt sunk in yet  ???

Thanks again

Steve :)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:config and more.help needed
« Reply #3 on: 05 Mar 2005, 16:39:17 »
I'll have a look-see, can't promise anything though.


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

MRsteve

  • Guest
Re:config and more.help needed
« Reply #4 on: 05 Mar 2005, 16:49:30 »
cheers and check pm's

Steve

Kyle Sarnik

  • Guest
Re:config and more.help needed
« Reply #5 on: 05 Mar 2005, 18:45:50 »
MRsteve, I suggest you try reading more configs, you need to find out yourself the order, placement, and definintion of all the cfg lines. Your weapon won't fire because your CfgAmmo is completly wrong. I can't show you how to do it because there are too many custom lines to add, but I suggest you try looking at someone else's config under the CfgAmmo section. Remember this; If you can't figure it out yourself, look for an example. Never try and config something on your own if you are uncertian about it.

Kyle Sarnik

  • Guest
Re:config and more.help needed
« Reply #6 on: 05 Mar 2005, 18:48:22 »
Also, add land contact points/LOD to your model, since it is no longer a house, it needs to know how to behave as a vehicle.

MRsteve

  • Guest
Re:config and more.help needed
« Reply #7 on: 05 Mar 2005, 19:09:16 »
thanks again for help Kyle

Luckily Planck's kindly having a shot at configing my bunker
I just cant get my head round it right now :-(
Steve

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:config and more.help needed
« Reply #8 on: 05 Mar 2005, 19:48:55 »
As Kyle said, you really need land contact points for your model now that it isn't a building any more.

Also....have you got a gunner proxy in the model for the gunner?

I presume your turret will be firing Sabot type ordnance.


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

MRsteve

  • Guest
Re:config and more.help needed
« Reply #9 on: 05 Mar 2005, 20:51:23 »
yes good tip about the land contacts
the gun is meant to be a 47mm

Thanks again guys
Steve

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:config and more.help needed
« Reply #10 on: 05 Mar 2005, 21:37:43 »
47mm....hmmmm

Would it not be better using the same type of ammo and weapon as the shilka's cannon?


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