Home   Help Search Login Register  

Author Topic: cpp help with Mech  (Read 1311 times)

0 Members and 1 Guest are viewing this topic.

1B1KSniper

  • Guest
cpp help with Mech
« on: 29 Dec 2002, 20:03:22 »
To the moderators: Please don't lock this, it is purely editing releated.
Now that that's out of the way.  I'm having a problem with a Mech addon that I am making.  I have removed the animations part because that is still waiting to be tested and I already have determined that not to be the source of the problem.  The problem is, it doesn't show up in the mission editor.  No error messages at all.
NEwayz here is the cpp
Quote
Code: [Select]
//Daishi by 1B1KSniper

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

class CfgPatches
{
  class Daishi
  {
     units[]={Daishi};
     weapons[]={};
     worlds[]={};
     requiredVersion=1.90;
   };
};
class CfgVehicles
{

   class All{};
   class AllVehicles: All{};
   class LandVehicle: AllVehicles{};
   class Tank: LandVehicle{};
   class Daishi:Tank
   {
   side=TWest;
   crew=SoldierW;
   vehicleclass=Mechs;
   displayname=Daishi;
             cost = 1000000000000000000;
   armor=100000;
   model=\daishi\daishi;
             hasDriver = 1;
             hasGunner = 0;
            driverIsCommander = 1;
            canFloat = 0;
   };
};
All help is appreciated.  Thanx.
-1B1KSniper

major asshole

  • Guest
Re:cpp help with Mech
« Reply #1 on: 29 Dec 2002, 21:00:12 »

G'day

As far as I can tell, the problem is with the vehicleClass line
This line should read Ammo,Objects,Men,Armored, etc.

hth

L8R

1B1KSniper

  • Guest
Re:cpp help with Mech
« Reply #2 on: 30 Dec 2002, 05:36:19 »
Nope.  If you read the v 1.85 changes you'll notice that you are now allowed to put anything you want for vehicleclass
I have successfully done this with some fortifications and a static version which I used to test the model ingame.
Besides, I have also tried removing that, and it still doesn't wok.

1B1KSniper

  • Guest
Re:cpp help with Mech
« Reply #3 on: 30 Dec 2002, 06:59:55 »
OK I fixed that part and the non animated version works ingame now.
Now for the hard experimental animations part:
Quote
Code: [Select]
//Daishi by 1B1KSniper
// 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

class CfgPatches
{
  class Daishi
  {
     units[]={Daishi};
     weapons[]={};
     worlds[]={};
     requiredVersion=1.90;
   };
};

class CfgMovesMC
{
   vehicleactions=;
   class Actions
   {
      class CfgManActions{};
      class DaishiActions:CfgManActions
      {
         WalkF="DaishiF";
         WalkB="DaishiB";
         Down="DaishiCrouch";
      };
      class DaishiCrouchActions:CfgManActions
      {
         up="DaishiUp";
      };
   };
   class States
   {
      class Default{};
      class DaishiF:Default
      {
         actions="DaishiActions";
         file="\daishi\daishiwalkforward.rtm";
         looped=1;
         enableMissile=1;
      };
      class DaishiB:Default
      {
         actions="DaishiActions";
         file="\daishi\daishiwalkbackwards.rtm";
         looped=1;
         enableMissile=1;
      };
      class DaishiCrouch:Default
      {
         actions="DaishiCrouchActions";
         file="\daishi\daishicrouch.rtm";
         looped=0;
         enableMissile=1;
      };
      class DaishiUp:Default
      {
         actions="DaishiActions";
         file="\Daishi\Daishicrouchup.rtm";
         looped=0;
         enableMissile=1;
      };
   };
};
class CfgVehicles
{

   class All{};
   class AllVehicles: All{};
   class LandVehicle: AllVehicles{};
   class Tank: LandVehicle{};
   class Daishi:Tank
   {
   side=1;
   crew="SoldierW";
   vehicleclass="Mechs";
   moves="DaishiActions";
   displayname="Daishi";
      cost=1000000000000000000;
   armor=100000;
   simulation="soldier"
   model="\daishi\daishi";
      hasDriver=1;
      hasGunner=0;
   hascommander=0;
      driverIsCommander=1;
      canFloat=0;
   };
};