Home   Help Search Login Register  

Author Topic: Config  (Read 1325 times)

0 Members and 1 Guest are viewing this topic.

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Config
« on: 10 Mar 2004, 03:02:10 »
ok i have a small problem ok i have defined the weapons and ammo and unit is ingame and driveable
but the weapons will not fire/display
i can only think that this is due to weapon class please some one help out as its the only thing stopping us from launching the tomahawk to the public thanks in advance

INFO
CLCM
(a Tomahawk launch platform) a truck to launch a tomahawk missile
anyway the cpp that muct be the problem
please help

Code: [Select]
#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
#define private 0
#define protected 1
#define public 2
#define WeaponHardMounted   65536
#define CanSeeRadar 1
#define CanSeeEye 2
#define CanSeeOptics 4
#define CanSeeEar 8
#define CanSeeCompass 16
#define CanSeeRadarC CanSeeRadar+CanSeeCompass
#define CanSeeAll 31

class CfgModels
{
        class Default{};
        class car: Default{};
        class GLCM: car{};

   class weapon: Default{};
   class Tom1: weapon{};
};

class CfgPatches
{
class GLCM
{
units[] = {GLCM};
weapons[] = {Tom1};
requiredVersion = 1.75;
};
};
class cfgammo
{
class Default{};
class AT3: Default{};
class CarlGustav: AT3{};
class Tom1: CarlGustav
{
hit=1150;indirectHit=700;indirectHitRange=6.5;
minRange=30;minRangeProbab=0.99;
midRange=2000;midRangeProbab=0.99;
maxRange=10000;maxRangeProbab=0.99;
soundHit[]={\LaserGuided\expl2,db50,1};
airLock = true;
model = "\GLCM\Tom1.p3d";
proxyShape ="\GLCM\Tom1.p3d";
maxControlRange=10000;
maneuvrability=15.0;
maxSpeed=2000;
thrustTime=5.5;
inittime=0.2;
thrust=2000;
simulation=shotmissile;
recoil=maingun;
sideAirFriction=0.002;
cost=10000;
visibleFire=12;
audibleFire=2;
visibleFireTime=2;
};
};
class CfgWeapons
{
   class Default {};
   class LAWLauncher: Default {};
   class CarlGustavLauncher : LAWLauncher {};
   class AT3Launcher: CarlGustavLauncher {};
   class HellfireLauncher: AT3Launcher {};
   class MaverickLauncher: HellfireLauncher {};
   class Tom1: MaverickLauncher
   {
model = "\GLCM\tom1.p3d";
proxyShape ="\GLCM\tom1.p3d";
modelOptics="";
picture="";
optics=1;
magazineReloadTime=3;
displayName="Tomahawk";
displayNameMagazine="Tomahawk";
shortNameMagazine="Tomahawk";
drySound[]={,0.010000,1};
magazines[]={"Tom1"};
ammo=tom1;
count=4;
canLock = 2;
reloadTime=20;
aiRateOfFire=5.00;
aiRateOfFireDistance=10000;
initSpeed=0;
maxLeadSpeed=3000;
};
};
class CfgVehicles
{      
        class All {};
   class AllVehicles: All {};
   class Land: AllVehicles {};   
   class LandVehicle : Land {};   
   class Car: LandVehicle {};   
   class Jeep: Car {};   
   class GLCM: Jeep
        {
           side=TWest;
                displayName="Ground Launcher";
      vehicleClass = "Armored";
                model="\GLCM\GLCM.p3d";
                crew="SoldierWB";
                maxSpeed=280;
                armor=30;
      soundEngine[]={"\GLCM\running.wav",30,1};
      armorGlass=1;
      armorWheels=0.3;
      castDriverShadow=1;
      weapons[]={Tom1};
      magazines[]={Tom1,Tom1};
      driverIsCommander=1;
      hasGunner=1;
      gunnerOpticsModel = "optika_heli_gunner";
      getInRadius=5;
      minFireTime=20;
      scope=2;
      transportSoldier=1;
      animated=1
      class Animations
      {
      class tubes
      {
      type="rotation";
      animPeriod=8
      selection="maintubes";
      axis="osa_tubes";
      angle0=0;
      angle1=+2;
 };
        };
class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyTom : ProxyWeapon
{
model = "\GLCM\Tom1.p3d"; simulation = "maverickweapon";
};
};

asmodeus

  • Guest
Re:Config
« Reply #1 on: 11 Mar 2004, 02:49:15 »
Hmmm

I took a look and didn't really see anything.  I'll ask LCD if he has the time to take a look for you as well since he's better at .cpp's.   ;)

Asmo

*edit*

Actually, I compared it to our sub's .cpp and noticed this...

Here is your cfgweapons:

Quote
class CfgWeapons
{
   class Default {};
   class LAWLauncher: Default {};
   class CarlGustavLauncher : LAWLauncher {};
   class AT3Launcher: CarlGustavLauncher {};
   class HellfireLauncher: AT3Launcher {};
   class MaverickLauncher: HellfireLauncher {};
   class Tom1: MaverickLauncher
   {

Here is our cfgweapons:

Quote
class CfgWeapons
{
   class Default   {};
   class MGun: Default{};
   class MachineGun7_6: MGun{};
        class MachineGun12_7: MachineGun7_6{};
        class Browning: MachineGun12_7{};
        class CoC_Mk48LauncherBoat:Browning{};

        class CoC_ShkvalLauncherBoat:CoC_Mk48LauncherBoat{};
   class CoC_ShkvalLauncherSUB: CoC_ShkvalLauncherBoat
   {
   count=10;
   };

   class CoC_APR3ELauncherBoat:CoC_Mk48LauncherBoat{};
   class CoC_APR3ELauncherSub:CoC_APR3ELauncherBoat
   {
   count=18;
   };
};

So, I could be completely wrong here, but could it be that you didn't specify the "count" ?  Hope that helps, let me know if not.

Asmo

*edit2*

One more thing I see, you have:

Quote
ammo=tom1;

But you defined it as Tom1 earlier...  Perhaps that could be part of it?  (even though if I remember right, capitalization might not matter in these.. but it can't hurt to make it match)
« Last Edit: 11 Mar 2004, 02:58:10 by Asmodeus »

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:Config
« Reply #2 on: 11 Mar 2004, 10:08:13 »
hi thanks for the reply much needed but i did define the count to 4 look on line 24 of class weapons but anyway yes please ask LCD for help as im stuck

Footmunch

  • Guest
Re:Config
« Reply #3 on: 11 Mar 2004, 17:05:19 »
Sadly, you can't attach a guided missile launcher to
a 'car' class vehicle - OFP engine limitation.

You can derive the launcher from the Browning
(as in the torpedo launcher), and in a script hanging
from the fired EH, replace the bullet fired with a
cam-created missile.

BoNeCoLLeCToR

  • Guest
Re:Config
« Reply #4 on: 12 Mar 2004, 04:37:29 »
Footmunch is right you cant fire guided missiles from car class engine limitation :-\
I suggest make the truck a tank class ;)
that way it can fire the tomahawk guided from the truck only thing is the truck can turn 360 degrees but who need that as long as it can launch the tomahawks it is ok ;)
Here is the cpp file for armoured class copy this cpp to your addon folder and it should work fine:



#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
#define private 0
#define protected 1
#define public 2
#define WeaponHardMounted   65536
#define CanSeeRadar 1
#define CanSeeEye 2
#define CanSeeOptics 4
#define CanSeeEar 8
#define CanSeeCompass 16
#define CanSeeRadarC CanSeeRadar+CanSeeCompass
#define CanSeeAll 31

class CfgModels
{
        class Default{};
        class Tank: Default{};
        class GLCM: Tank{};

   class weapon: Default{};
   class Tom1: weapon{};
};

class CfgPatches
{
class GLCM
{
units[] = {GLCM};
weapons[] = {Tom1};
requiredVersion = 1.75;
};
};
class cfgammo
{
class Default{};
class AT3: Default{};
class CarlGustav: AT3{};
class Tom1: CarlGustav
{
hit=1150;indirectHit=700;indirectHitRange=6.5;
minRange=30;minRangeProbab=0.99;
midRange=2000;midRangeProbab=0.99;
maxRange=10000;maxRangeProbab=0.99;
soundHit[]={\LaserGuided\expl2,db50,1};
airLock = true;
model = "\GLCM\Tom1.p3d";
proxyShape ="\GLCM\Tom1.p3d";
maxControlRange=10000;
maneuvrability=15.0;
maxSpeed=2000;
thrustTime=5.5;
inittime=0.2;
thrust=2000;
simulation=shotmissile;
recoil=maingun;
sideAirFriction=0.002;
cost=10000;
visibleFire=12;
audibleFire=2;
visibleFireTime=2;
};
};
class CfgWeapons
{
   class Default {};
   class LAWLauncher: Default {};
   class CarlGustavLauncher : LAWLauncher {};
   class AT3Launcher: CarlGustavLauncher {};
   class HellfireLauncher: AT3Launcher {};
   class MaverickLauncher: HellfireLauncher {};
   class Tom1: MaverickLauncher
   {
model = "\GLCM\tom1.p3d";
proxyShape ="\GLCM\tom1.p3d";
modelOptics="";
picture="";
optics=1;
magazineReloadTime=3;
displayName="Tomahawk";
displayNameMagazine="Tomahawk";
shortNameMagazine="Tomahawk";
drySound[]={,0.010000,1};
magazines[]={"Tom1"};
ammo=tom1;
count=4;
canLock = 2;
reloadTime=20;
aiRateOfFire=5.00;
aiRateOfFireDistance=10000;
initSpeed=0;
maxLeadSpeed=3000;
};
};
class CfgVehicles
{      
        class All {};
   class AllVehicles: All {};
   class Land: AllVehicles {};  
   class LandVehicle : Land {};  
   class Tank: LandVehicle {};  
   class M60: Tank {};  
   class GLCM: M60
        {
           side=TWest;
                displayName="Ground Launcher";
      vehicleClass = "Armored";
                model="\GLCM\GLCM.p3d";
                crew="SoldierWB";
                maxSpeed=280;
                armor=30;
      soundEngine[]={"\GLCM\running.wav",30,1};
      armorGlass=1;
      armorWheels=0.3;
      castDriverShadow=1;
      weapons[]={Tom1};
      magazines[]={Tom1,Tom1};
      driverIsCommander=1;
      hasGunner=1;
      gunnerOpticsModel = "optika_heli_gunner";
      getInRadius=5;
      minFireTime=20;
      scope=2;
      transportSoldier=1;
      animated=1
      class Animations
      {
      class tubes
      {
      type="rotation";
      animPeriod=8
      selection="maintubes";
      axis="osa_tubes";
      angle0=0;
      angle1=+2;
};
        };
class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyTom : ProxyWeapon
{
model = "\GLCM\Tom1.p3d"; simulation = "maverickweapon";
};
};
« Last Edit: 12 Mar 2004, 05:28:43 by BoNeCoLLeCToR »