Home   Help Search Login Register  

Author Topic: Help with config (M49 Binocular)  (Read 5523 times)

0 Members and 1 Guest are viewing this topic.

Teryan

  • Guest
Re:Help with config (M49 Binocular)
« Reply #30 on: 10 Apr 2004, 21:50:40 »
Thanks alot for your help.    :)

See ya around.

I'm going to go thur the .cpp tutorial (again) and try to figure it all out.  

Teryan

  • Guest
Re:Help with config (M49 Binocular)
« Reply #31 on: 10 Apr 2004, 22:13:38 »
Ok, after re-reading the tutorial (again). I have modifyed it to this:
Quote
// 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



class CfgPatches
{
class M49
{
    units[]={};
    weapons[]={M49_Observation};
    worlds[]={};
    requiredVersion=1.85;
  };
};

class CfgWeapons
{
 class Default {};
 class M49_Observation: Default

  {
    displayName="M49";
    scopeWeapon=2;
    scopeMagazine=1;
    model = "\M49\m49telecope.p3d";
    picture="\M49\w_m49.pac";
    optics = true;
    opticsZoomMin = 20;
    opticsZoomMax = 20;
    distanceZoomMin = 20;
    distanceZoomMax = 20;
  };
};

class CfgAmmo
{
 class Default {};
  {
  };
};

lass CfgModels
 {
  class Default { };
  class M49: Default
  {
      sections[]={""};
      sectionsInherit="";
  };

class CfgNonAIVehicles
  {
   class proxyweapon {};
   class ProxyM49_Observation: proxyweapon {};
};

};

Class CfgAmmo
{
 class default {};
  {
  };
};

lass CfgModels
 {
  class Default { };
  class M49: Default
  {
      sections[]={""};
      sectionsInherit="";
  };

class CfgNonAIVehicles
  {
   class ProxyWeapon {};
   class ProxyM49_Observation: ProxyWeapon {};
};


};

I'm not shure what I should do about the cfgAmmo class.  I dont want any ammo to be used by it and leaving it bank give me a error message when I start up.  Maby I should inheariate some other ammo from some other gun and not make any magazines so the spotting scope cant shoot (that's the guns job)?  Also, can I keep the inhearated for the m49 from default? Will that work?

As for the binocular thing, did you know that the BIS comand refrence has a example for it?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Help with config (M49 Binocular)
« Reply #32 on: 11 Apr 2004, 14:47:19 »
I note that the config you posted above has cfgModels and cfgNonAiVehicles twice, you might want to fix that.

However, I did a little work on a copy, have a look and try it.

Hopefully it might help a bit till someone with weapon experience comes along.

Code: [Select]
// 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

class CfgPatches
{
  class M49
  {
    units[]={};
    weapons[]={M49_Observation};
    worlds[]={};
    requiredVersion=1.85;
  };
};

class CfgWeapons
{
  class Default {};
  class M49_Observation: Default
  {
    scopeWeapon=2;
    scopeMagazine=1;

    model="\M49\m49telecope_proxy.p3d";
    modelOptics="";

    valueWeapon = 5;

    weaponType = WeaponSlotSecondary;
    magazineType = WeaponNoSlot;
    ammo=;
    displayName="M49";
    picture="\M49\w_m49.pac";
    reloadTime=0.0;
    canLock=LockNo;

    optics = true;
    forceOptics = true;

    primary = false;
    opticsZoomMin = 20;
    opticsZoomMax = 20;
    distanceZoomMin = 20;
    distanceZoomMax =

    magazines[] = {};
  };
};

class CfgAmmo
{
  class Default {};
};

class CfgModels
{
  class Default { };
  class M49: Default
  {
    sections[]={""};
    sectionsInherit="";
  };
};

class CfgNonAIVehicles
{
  class ProxySecWeapon {};
  class ProxyM49telescope_proxy: ProxySecWeapon {};
};

If you use this config, you need to rename your P3D file to:

m49telecope_proxy.p3d

Let me know if it helps any.

btw: Yes I knew about the Binocular section in the commented configs, haven't noticed anything in the command reference though.



Planck
« Last Edit: 11 Apr 2004, 14:50:41 by Planck »
I know a little about a lot, and a lot about a little.

Teryan

  • Guest
Re:Help with config (M49 Binocular)
« Reply #33 on: 11 Apr 2004, 19:32:35 »
I tried it and it did not show up, it did not appear in the menu (could not drop it like i use to be able to), it did not appear in the equipment section (the picture never did thow), and still no modle out side the guy.  It was like it was just a regular civilan.... Could it be due to being a proxy modle?  Why did you add the _proxy to the name?
Forgot to put the 20 here: distanceZoomMax =
I fixed it and tried it. Same thing.
Thx thow.

This is ofpec, where are the weapond experts?  ???
« Last Edit: 11 Apr 2004, 19:38:38 by Teryan »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Help with config (M49 Binocular)
« Reply #34 on: 11 Apr 2004, 20:30:30 »
Well this can take a long time......I can come up with things to try,but only you can try them out.

If you send me a copy of your addon PBO, I can see what I can come up with.

Failing that you will just have to wait till someone comes along.


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

Teryan

  • Guest
Re:Help with config (M49 Binocular)
« Reply #35 on: 11 Apr 2004, 21:44:48 »
Yea, i will send it to you.  It's on it's way  :)
Thanks again.  
« Last Edit: 11 Apr 2004, 21:46:19 by Teryan »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Help with config (M49 Binocular)
« Reply #36 on: 11 Apr 2004, 22:03:10 »
OK Teryan

I got your file, I will see what I can come up with, no promises but I will try.


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

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Help with config (M49 Binocular)
« Reply #37 on: 14 Apr 2004, 22:28:48 »
I need to send this back to you now Teryan, unfortunately, I lost your email address.

Please confirm that the one in your profile is still current and I will use that.

If it is no longer valid, please give me a valid address to use.



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

Teryan

  • Guest
Re:Help with config (M49 Binocular)
« Reply #38 on: 14 Apr 2004, 23:47:46 »
Ok,
mountainguy30@hotmail.com
this is probly different from my profile
thx for help.