Home   Help Search Login Register  

Author Topic: radar  (Read 1340 times)

0 Members and 1 Guest are viewing this topic.

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
radar
« on: 26 Aug 2003, 23:22:32 »
ok im makeing a addon with a radar how do i config the radar to work

Kaliyuga

  • Guest
Re:radar
« Reply #1 on: 27 Aug 2003, 00:05:34 »
You define what each position inside the vehicle can and cannot see:

gunnerCanSee = CanSeeRadarC+CanSeeOptics+CanSeeEar;

also: CommanderCanSee; DriverCanSee;


then you can define a few things about your radar with these lines:

irScanRange = 4000; // long range radar
irScanGround = false;  // NO IR on ground targets

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:radar
« Reply #2 on: 27 Aug 2003, 09:55:46 »
will try this now thanks

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:radar
« Reply #3 on: 27 Aug 2003, 10:12:59 »
Ok tryed to do it but no joy addons gose in game but no radar shows when in gunner + there is no driver/commander is this the problem i have if not i added the cpp and its the last entry in the cpp please help

Code: [Select]
//   H_W_trai by H_W_PROJECT  http://stargate.evilmadman.com/
//   This addon for Operation Flashpoint is freeware. Not interelly tested. Use it at your own risk.
 
//      Models by WizzyWig - Hobbit
//   Skinning by wizzywig - Hobbit
//   O2 Coding and config by wizzywig - Hobbit
//   Scripts by WIZZYWIG
//   Version 1.75

#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


class CfgPatches
{
   class H_W_trai
   {
      units[] = {H_W_trai};
      weapons[] = {};
      requiredVersion = 1.75;
   };
   class H_W_traifuel
   {
      units[] = {H_W_traifuel};
      weapons[] = {};
      requiredVersion = 1.75;
   };
   class H_W_trai1
   {
      units[] = {H_W_trai1};
      weapons[] = {};
      requiredVersion = 1.75;
   };
   class H_W_traiguns
   {
      units[] = {H_W_traiguns};
      weapons[] = {};
      requiredVersion = 1.90;
      };
};

class CfgWeapons
{
   class Default{};
   class MGun: Default{};
   class MachineGun7_6: MGun{};
   class MachineGun12_7: MachineGun7_6{};
   class Browning: MachineGun12_7{};
   class WMG: Browning
   {
         displayName="WMG";
         displayNameMagazine="WMG";
         shortNameMagazine="WMG";
         count=10000;
         initSpeed=600;
         reloadTime=0.0400000;
      dispersion=0.0015;
                   soundContinuous=0;
         maxLeadSpeed=865;


      aiRateOfFire=0.000001; // 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 Car:LandVehicle{};
class Tank:LandVehicle{};
class APC: Tank{};
class M113:APC{};
class M2StaticMG: M113{};
class Jeep:Car {};
class Truck:Car{};  
class Ural:Truck{};

class H_W_trai: Ural
   {
      side=TEast;
      sensitivity=1.25;
      soundEngine[]={"\H_W_trai\34r.wav",30,1};
      scope=2;
      crew="soldiereb";
      cost=400000;
      canHideBodies=0;
      armor=30000000;
      armorWheels=30;
      carmouflage=1;
      maxSpeed=320;
      fuelCapacity=400;
      hasDriver = 0;
      hasGunner = 0;
      hasCommander = 0;
      displayName="H_W_trai";
      model="\H_W_trai\H_W_trai.p3d";
      hiddenSelections[]={"load"};
      animated=1
                class animations
      {
             class load
                  {
                        type=rotation;
         animperiod=.00001;
         selection=load;
         axis=osa load;
         angle0=0;
         angle1=-1;
         angle2=0;
                };
                 class wheels
                  {
                        type=rotation;
         animperiod=0.0000001;
         selection=wheels;
         axis=osa wheels;
         angle0=0;
         angle1=-6.4;
      
                };
                 class wheels1
                  {
                        type=rotation;
         animperiod=0.0000001;
         selection=wheels1;
         axis=osa wheels1;
         angle0=0;
         angle1=-6.4;
      
                };
           };
                class useractions
               {
                 class trailerload
                 {
                  displayName="Load Trailer";
                  position="load";
                  radius=10
                  condition="(nearestobject [this, ""H_W_cab""]) distance this < 10 and this animationphase ""load"" == 0";
                  statement="[nearestobject [this, ""H_W_cab""],this,1.9,.19] exec ""\H_W_trai\towing.sqs""";
                 };
          class trailuload
                 {
                  displayName="Trailer Unload";
                  position="load";
                  radius=10
        condition="this animationphase ""load"" != 0";
                  statement="this animate [""load"", 0],this exec ""\H_W_trai\unload.sqs""";  
                 };
                 
    };
class eventhandlers
   {
        init="[_this select 0] exec ""\H_W_trai\manager.sqs""";
   };
         };         
class H_W_traifuel: Ural
   {
      side=TEast;
      sensitivity=1.25;
      soundEngine[]={"\H_W_trai\34r.wav",30,1};
      scope=2;
      crew="soldiereb";
      cost=400000;
      canHideBodies=0;
      armor=30000000;
      armorWheels=30;
      carmouflage=1;
      maxSpeed=320;
      fuelCapacity=400;
      hasDriver = 0;
      hasGunner = 0;
      hasCommander = 0;
      displayName="H_W_traifuel";
      model="\H_W_trai\H_W_traifuel.p3d";
      hiddenSelections[]={"load"};
      animated=1
                 class animations
      {
             class load
                  {
                        type=rotation;
         animperiod=.00001;
         selection=load;
         axis=osa load;
         angle0=0;
         angle1=-1;
         angle2=0;
                };
                class wheels
                  {
                        type=rotation;
         animperiod=0.0000001;
         selection=wheels;
         axis=osa wheels;
         angle0=0;
         angle1=-6.4;
      
                };
                class wheels1
                  {
                        type=rotation;
         animperiod=0.0000001;
         selection=wheels1;
         axis=osa wheels1;
         angle0=0;
         angle1=-6.4;
      
                };
        };
                      class useractions
               {
                class trailerload
                {
                  displayName="Load fuel";
                  position="load";
                  radius=10
                  condition="(nearestobject [this, ""H_W_cab""]) distance this < 10 and this animationphase ""load"" == 0";
                  statement="[nearestobject [this, ""H_W_cab""],this,1.9,.19] exec ""\H_W_trai\towing.sqs""";
                 };
          class trailuload
                 {
                  displayName="fuel Unload";
                  position="load";
                  radius=10
        condition="this animationphase ""load"" != 0";
                  statement="this animate [""load"", 0]";
                 };
                 
    };
class eventhandlers
   {
        init="[_this select 0] exec ""\H_W_trai\manager.sqs""";
   };
};   
class H_W_trai1: Ural
   {
      side=TEast;
      sensitivity=1.25;
      soundEngine[]={"\H_W_trai\34r.wav",30,1};
      scope=2;
      crew="soldiereb";
      cost=400000;
      canHideBodies=0;
      armor=30000000;
      armorWheels=30;
      carmouflage=1;
      maxSpeed=320;
      fuelCapacity=400;
      hasDriver = 0;
      hasGunner = 0;
      hasCommander = 0;
      displayName="H_W_trai";
      model="\H_W_trai\H_W_trai1.p3d";
      hiddenSelections[]={"load"};
      animated=1
                class animations
      {
             class load
                  {
                        type=rotation;
         animperiod=.00001;
         selection=load;
         axis=osa load;
         angle0=0;
         angle1=-1;
         angle2=0;
                };
                 class wheels
                  {
                        type=rotation;
         animperiod=0.0000001;
         selection=wheels;
         axis=osa wheels;
         angle0=0;
         angle1=-6.4;
      
                };
                 class wheels1
                  {
                        type=rotation;
         animperiod=0.0000001;
         selection=wheels1;
         axis=osa wheels1;
         angle0=0;
         angle1=-6.4;
      
                };
           };
                class useractions
               {
                 class trailerload
                 {
                  displayName="Load Trailerbox";
                  position="load";
                  radius=10
                  condition="(nearestobject [this, ""H_W_cab""]) distance this < 10 and this animationphase ""load"" == 0";
                  statement="[nearestobject [this, ""H_W_cab""],this,1.9,.19] exec ""\H_W_trai\towing.sqs""";
                 };
          class trailuload
                 {
                  displayName="Trailerbox Unload";
                  position="load";
                  radius=10
        condition="this animationphase ""load"" != 0";
                  statement="this animate [""load"", 0]";
                 };
                 
    };
class eventhandlers
   {
        init="[_this select 0] exec ""\H_W_trai\manager.sqs""";
   };
         };               
class H_W_traiguns: M2StaticMG
   {
   side=TEast;
   sensitivity=1.25;
   scope=2;
   hasGunner = 1;
   model="\H_W_trai\H_W_traiguns.p3d";
   cost=1000;
   gunnerCanSee = CanSeeRadarC+CanSeeOptics+CanSeeEar;
    irScanRange = 4000; // long range radar
   irScanGround = false;  // NO IR on ground targets
   weapons[]={"WMG"};
   magazines[]={WMG,WMG,WMG,WMG,WMG,WMG};
   displayName="H_W_traiguns";
   icon="";
   animated=1
                class animations
      {
             class load
                  {
                        type=rotation;
         animperiod=.00001;
         selection=load;
         axis=osa load;
         angle0=0;
         angle1=-1;
         angle2=0;
                };
                 class wheels
                  {
                        type=rotation;
         animperiod=0.0000001;
         selection=wheels;
         axis=osa wheels;
         angle0=0;
         angle1=-6.4;
      
                };
                 class wheels1
                  {
                        type=rotation;
         animperiod=0.0000001;
         selection=wheels1;
         axis=osa wheels1;
         angle0=0;
         angle1=-6.4;
      };
      class back1
      {
         type="rotation";
         animPeriod=3
         selection="back1";
         axis="osa_mainL";
         angle0=0
         angle1=-1.600000;
      };
      class back2
      {
         type="rotation";
         animPeriod=3
         selection="back2";
         axis="osa_mainR";
         angle0=0
         angle1=-1.600000;
      };
      class side1
      {
         type="rotation";
         animPeriod=3
         selection="side1";
         axis="osa_side1";
         angle0=0
         angle1=-1.600000;
      };
      class side2
      {
         type="rotation";
         animPeriod=3
         selection="side2";
         axis="osa_side2";
         angle0=0
         angle1=-1.600000;
      };
      class side3
      {
         type="rotation";
         animPeriod=3
         selection="side3";
         axis="osa_side3";
         angle0=0
         angle1=-1.600000;
      };
      class side4
      {
         type="rotation";
         animPeriod=3
         selection="side4";
         axis="osa_side4";
         angle0=0
         angle1=-1.600000;
      };
      class sat
      {
         type="rotation";
         animPeriod=3
         selection="sat";
         axis="osa_sat";
         angle0=0
         angle1=-1.600000;
      };
      class stairs
      {
         type="rotation";
         animPeriod=3
         selection="stairs";
         axis="osa_stairs";
         angle0=0
         angle1=-2.3;
      };
      };
      class UserActions
      {
      class Opendefence
      {
         displayName="Open Defence";
         position="main";
         radius=3;
         condition="this animationPhase ""side1"" < 0.5";
         statement= "this exec ""\H_W_trai\gunsopen.sqs""";
      };
      class Closesides
      {
         displayName="Close Defence";
         position="main";
         radius=3;
         condition="this animationPhase ""side1"" >= 0.5";
         statement= "this exec ""\H_W_trai\gunsclose.sqs""";
        };
           class mgtrailerload
                 {
                  displayName="Load MGTrailerbox";
                  position="load";
                  radius=10
                  condition="(nearestobject [this, ""H_W_cab""]) distance this < 10 and this animationphase ""load"" == 0";
                  statement="[nearestobject [this, ""H_W_cab""],this,1.9,.19] exec ""\H_W_trai\towing.sqs""";
                 };
          class mgtrailuload
                 {
                  displayName="MGTrailerbox Unload";
                  position="load";
                  radius=10
        condition="this animationphase ""load"" != 0";
                  statement="this animate [""load"", 0]";
                 };
                 
    };
class eventhandlers
   {
        init="[_this select 0] exec ""\H_W_trai\manager.sqs""";
   };
         };               
};

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:radar
« Reply #4 on: 27 Aug 2003, 10:45:59 »

just so you an see what i wont

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:radar
« Reply #5 on: 27 Aug 2003, 20:14:28 »
still need help hope helpcome soon as project is hulted till i finish this

swift88

  • Guest
Re:radar
« Reply #6 on: 27 Aug 2003, 20:48:21 »
wizzy wig you got the trailer script sorted yet

Kaliyuga

  • Guest
Re:radar
« Reply #7 on: 28 Aug 2003, 00:07:13 »
my guess is this is the reason:

Code: [Select]
class All{};
class AllVehicles:All{};
class Land:AllVehicles{};
class LandVehicle:Land{};
class Car:LandVehicle{};
class Tank:LandVehicle{};
class APC: Tank{};
class M113:APC{};
class M2StaticMG: M113{};
class Jeep:Car {};
class Truck:Car{};  
class Ural:Truck{};

Your vehicle class is based off of a truck.. which doesnt have radar?

just a guess...

but what if you based it off a Jeep with MG instead as far as the vehicle class goes...

I mean .. thinking as the game would... it would appear that what you are making is pretty much an altered Jeep with MG isn't it?


« Last Edit: 28 Aug 2003, 00:08:04 by Kaliyuga »

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:radar
« Reply #8 on: 28 Aug 2003, 00:34:30 »
no completely different can you please help me with a cpp that has a radar in the config so i know how to use it what should the cpp def be please give ex-sample thank you

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:radar
« Reply #9 on: 28 Aug 2003, 00:35:12 »
wizzy wig you got the trailer script sorted yet

yes that is sorted

but still need radar help
« Last Edit: 28 Aug 2003, 19:11:45 by WizzyWig »