////////////////

//BASE VEHICLE//

////////////////

 

 

////////////////////////////////////////

//  READ THIS FIRST!!!!  -> Inheritence

////////////////////////////////////////

 

// NOTE:  These are NOT to define your own type of vehicle!

// These are desinged for you to easily create a new vehicle bases

// off a Tank, Plane or Boat.

 

/*  A way to reduce code is to incorporate inheritance.

            Basically, this is where one class is taking values from

            another 'base' class.

 

    So, say you have 4 east models, and you want each to have

            some of the same functions (like side=TEAST, or if they all have

            the same basic weapon), you can base the new class off the old one.

 

            Okay, for example, on the west side are 2 tanks.  The RedTank

            and the BlueTank.  Right, so each tank has the same basic weapon.

            Also, each belongs to West, and each have the same noise,

            speed, and so on.

 

    To make it shorter?  Put all the stuff that is being shared in one

            base class (like, ColouredTanks).  So it could look like:

 

 

            class ColouredTanks

            {

                        side=TWEST;

                        accuracy=0.50;

                        maxSpeed = 100;

 

                        weapons[]={MaverickLauncher, MachineGun30A10Burst};

                       

                        etc.

            };

 

    Now all you need to do for the 2 new tanks is:

 

            class RedTank: ColouredTanks

            {

                        model=redtank;

            };

 

            class BlueTank: ColouredTanks

            {

                        model=bluetank;

            };

 

 

 

            --> And there you have it! Two identical tanks, with as little code

                        as is possible.

 

                        Now, that's how inheritance works!

*/

 

 

///////////////////////////////////////////////////////

///////////////////////////////////////////////////////

// Basic class to build a plane

///////////////////////////////////////////////////////

///////////////////////////////////////////////////////

 

            // Note: Change PLANE to the name of your plane

            class PLANE: Plane // : Plane -- This is the base class.

                                                               //         -- Read above for help.

                                                               // PLANE:  -- Change this to the name of your vehicle

            {

                        //--

                        scope=public; // -> Not sure, just keep public.

                        crew = CREW;            // -> Change crew (eg. SoldierWPilot, Civilian)

                        picture=ia10;    // -> Change it's picture (eg. ia10)

 

                        gearRetracting = false; // Can the gear retract? TRUE/FALSE (default false)

 

 

                        ejectSpeed[]={0,0,0}; // Change the eject speed

                                                                                      // I think {0,0,0} is X, Y, Z

                                                                                      // TO BE COMPLETED

 

 

 

                        side=TSIDE;  // Defines the Side (eg. TWest, TCivilian);

 

                        displayName=$STR_DN_???;  // Display name; TO BE COMPLETED

 

                        nameSound="thunderbolt";        // TO BE DONE

 

                        accuracy=0.50;  // Alter it's accuracy (default 0.50)

 

                        driverAction = ManActA10Pilot; // TO BE DONE

 

                        maxSpeed = 100;         // Change it's maximum speed (default 100)

 

                        laserScanner = false;  // Has a laser scanner? TRUE/FALSE (default false)

 

                        armor=50; // -> Set it's armour (default 50)

                        cost=10000; //  -> Change it's cost (default 10000)

                                                            //  NOTE: Not sure what this does, so TO BE DONE

 

                        model=MODEL;          // -> Choose the planes model (eg. a10);

 

                        /* WEAPONS */

 

                        //          Examples:

                        //          weapons[]={MaverickLauncher, MachineGun30A10Burst};

                        //          magazines[]={MaverickLauncher, MachineGun30A10Burst};

                        //          weapons[]={MachineGun30};

                        //          magazines[]={MachineGun30};

 

                        //Put your weapons here:

 

                        (WEAPON/MAGAZINE)[]={ WEAPONTYPE, FIRETYPE }; // I think it's fire type.

                                                                                                                                                              // TO BE UPDATED

 

                        /* END WEAPONS */

 

 

 

                        fov=0.5; // Alter it's field of view (default 0.5)

           

 

                        //TO BE COMPLETED

 

                        type=VAir;

                        //threat[] VSoft, VArmor, VAir

                        threat[]={0.1, 1, 0.7};

 

                        // END TO BE COMPLETED

 

 

 

                        // This following lines define the aspects of the plane in-game

                        landingAoa = 7*3.1415/180; // WTF????  TO BE DONE

 

                        /* These two I'm still not sure of, wait for update or uncomment

 

                                    driverAction=ManActCessnaPilot;

                                    cargoAction[]={ManActCessnaCoPilot,ManActCessnaCargo};

 

                        */

 

                        // -> Sound of the plane

                        soundEngine[]={Vehicles\plane,db-10,1};

                        soundEnviron[]={Objects\noise,db-60,1.0};

                        soundServo[]={Vehicles\gun_elevate,db-40,0.4};

                                    // SOUNDTYPE[]={sound-location, decibals, TBC}

 

 

                        transportSoldier = 0; // -> Defines the number of soliders

                                                                                      //        it can transport (default 0)

 

                        extCameraPosition[]={0,2,-30}; // Setup where the camera is

                                                                                                               // behind the plane.  Some

                                                                                                               // Trial & Error is expected.

 

 

                        type=VAir;

                        //threat[] VSoft, VArmor, VAir -> Not sure, will check up on soon

                        threat[]={0.1, 1, 0.7};

 

                       

                        audible = 6; // HOW LOUD IS IT!!!!!!!! (default 6; around Cessna noise)

 

 

                        // EXPERT

                        aileronSensitivity = 0.33; // relative aileron sensitivity

                        elevatorSensitivity = 0.1; // relative elevator sensitivity

 

 

                        noseDownCoef = 0.05; // how much the nose drops whilst turning

                                                                                      // Experiment with it. (default 0.5)

 

 

                        //------------------------------------------

                        // SPECIAL

                        //------------------------------------------

 

                        // Now let's add some special stuff :D

 

 

                        // NOTE: All these special additionsare from

                        //                      the Cessna model, which is based

                        //                      off the A10  (Cessna: A10)

 

 

 

 

                        /* Can't be bothered doing all these.  Basically, if you

                           don't want one, just delete the code or comment it out

                           (like how this sentance has been done!) */

 

                        class Reflectors

                        {

                                    class Left

                                    {

                                                color[] = {0.9, 0.8, 0.8, 1.0};

                                                ambient[] = {0.1, 0.1, 0.1, 1.0};

                                                position = "L svetlo";

                                                direction = "konec L svetla";

                                                hitpoint = "L svetlo";

                                                selection = "L svetlo";

                                                size = 0.5;

                                                brightness = 0.25;

                                    };

                                    class Right

                                    {

                                                color[] = {0.9, 0.8, 0.8, 1.0};

                                                ambient[] = {0.1, 0.1, 0.1, 1.0};

                                                position = "P svetlo";

                                                direction = "konec P svetla";

                                                hitpoint = "P svetlo";

                                                selection = "P svetlo";

                                                size = 0.5;

                                                brightness = 0.25;

                                    };

                        };

 

 

                        class IndicatorAltRadar

                        {

                                    // max for this indicator is 1000 feet (i.e. 304m)

                                    // note: this is actualy Baro altitude (name is wrong)

                                    selection = "alt";

                                    axis = "osa_alt";

                                    angle = -355;

                                    min = 0;

                                    max = 150;

                        };

                        class IndicatorAltRadar2

                        {

                                    // max for this indicator is 1000 feet (i.e. 304m)

                                    // note: this is actualy Baro altitude (name is wrong)

                                    selection = "alt2";

                                    axis = "osa_alt2";

                                    angle = -355;

                                    min = 0;

                                    max = 150;

                        };

                        class IndicatorSpeed

                        {

                                    selection = "mph";

                                    axis = "osa_mph";

                                    angle = -300;

                                    min = 0;

                                    max = 90;

                        };

                        class IndicatorVertSpeed

                        {

                                    selection = "vert_speed";

                                    axis = "osa_vert_speed";

                                    angle = -300;

                                    min = -30;

                                    max = 30;

                        };

                        class IndicatorVertSpeed2

                        {

                                    selection = "vert_speed2";

                                    axis = "osa_vert_speed2";

                                    angle = -300;

                                    min = -30;

                                    max = 30;

                        };

                        class IndicatorRPM

                        {

                                    selection = "rpm";

                                    axis = "osa_rpm";

                                    angle = -240;

                                    min = 0;

                                    max = 1;

                        };

                        class IndicatorCompass

                        {

                                    selection = "kompas";

                                    axis = "osa_kompas";

                                    angle = 360;

                                    min = -3.1415926536;

                                    max = 3.1415926536;

                        };

                        class IndicatorWatch

                        {

                                    hour = "hodinova";

                                    minute = "minutova";

                                    axis = "osa_time";

                                    reversed = false;

                        };

                        class IndicatorWatch2

                        {

                                    hour = "hodinova2";

                                    minute = "minutova2";

                                    axis = "osa_time2";

                                    reversed = false;

                        };

 

 

 

};

 

 

///////////////////////////////////////////////////////

///////////////////////////////////////////////////////

// Basic class to build a tank

///////////////////////////////////////////////////////

///////////////////////////////////////////////////////

 

class TANK: Tank  // : Tank -> This is the base class

                                                  // Read top of file for help

                                                  // TANK: Chamge this to the name of your tank

{

            //-

 

            scope=public; // -> Not sure, just keep public.

 

            crew = CREW; // -> Change it's crew (eg. SoldierECrew)

 

            side=SIDE       // -> Set it's side here (eg. TEast, TCivilian)

            picture=PICTURE;  // -> Set it's picture (eg. it55, izsu)

 

            displayName=$STR_DN_???; // Set it's display name in ???

                                                                                     // (eg. $STR_DN_ZSU) TO BE COMPLETED

 

            nameSound="nameSOUND"; // -> Will check up on this one ;)

 

            accuracy=0.50; // -> Set it's accuracy (default 0.50)

 

 

            /* CAN SEE... will compile a list of CanSee functions, so don't

                                                  worry about it ;)  For starters, commander may be

                                                  CanSeeAll, and gunner CanSeeRadarC, CanSeeOptics */

            commanderCanSee = CanSee...;

            gunnerCanSee = CanSee...;

 

 

            armor=200; // -> this is easy, basiclly it's armour value :D (default 200)

            cost=100000; // -> NOT SURE... what does cost do?  TO BE COMPLETED

            maxSpeed=50; // -> Set it's maximum speed (default 50)