Home   Help Search Login Register  

Author Topic: GUN FLASH  (Read 1643 times)

0 Members and 1 Guest are viewing this topic.

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
GUN FLASH
« on: 24 Mar 2004, 14:53:45 »
hi i have created a model (aircraft) but with i play it in agme i get the flash always on i have named it zasleh i think it might be my config please can you take a look and tel me what i have done wroung i have two guns a the pic shows


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
class CfgPatches
{
class xplaneset
   {
      units[] = {xplane};
      weapons[] = {};
      requiredVersion = 1.91;
           };
};
class CfgAmmo
{
   class Default {};
   class BulletSingle: default {};
   class ExplosiveBullet: BulletSingle {};
   class Bullet30: ExplosiveBullet {};
   class 30mm: Bullet30
 {
      hit=30;
      indirectHit=15;
      explosive=1;   
      };
};
class CfgWeapons
{
   class Default {};
        class MGun: Default {};
   class MachineGun7_6: MGun {};
   class MachineGun30: MachineGun7_6 {};
   class 30mm: MachineGun30
   {
      displayName="30mm";
      displayNameMagazine="30mm mag";
      shortNameMagazine="30 mag";
      ammo="30MM";
      count=1000;
      reloadTime=0.070000;
      initSpeed=2000;
      sound[]={"\xplane\fx\gun.wav",5.162278,1};
      soundContinuous=0;
      maxLeadSpeed=950;
      autoFire = true;
   };

};

class CfgVehicles
{
   class All {};
   class AllVehicles: All {};
   class Air: AllVehicles {};
   class Plane: Air {};
   class xplane: Plane
        {
           vehicleClass = "Air";
      crew="SoldierWPilot";
      side=TWest;
      driverAction = ManActA10Pilot;
                accuracy=0.50;
                laserScanner = true;
                armor=50;
                cost=20000000;
                fov=0.5;
                type=VAir;
      landingAoa = 7*3.1415/180;
                extCameraPosition[]={0,2,-30};
                landingSpeed = 200;
                aileronSensitivity = 0.8;
      elevatorSensitivity = 0.8;
      noseDownCoef = 0.8;
           flapsFrictionCoef = 0.8;
      wheelSteeringSensitivity = 1.0;
      brakeDistance=50;
      ejectSpeed[]={0,80,-30};
      precision=200;
                fuelCapacity=1000;
                insideSoundCoef = 0.05;
                nightVision=true;
                gearRetracting = false;
      displayName="xplane";
      irTarget=1;
      irScanRange=4000;
      irScanGround=1500;
                  maxSpeed = 800;
      weapons[]={30mm};
      magazines[]={30mm};
      model="\xplane\xplane";
      scope=2;
      soundEngine[]={"\xplane\fx\eng.wav",db-10,1};
      soundCrash[]={"\xplane\fx\crash.wav",db10,1};
      soundLandCrash[]={"\xplane\fx\touch.wav",db5,1};
      soundWaterCrash[]={"\xplane\fx\crashwater.wav",db10,1};
      animated=1;
      class Animations
      {
      
         class gearL
         {
            type="rotation";
            animperiod = 2;
            selection ="gearL";
            axis = "osa_gearL";
            angle0=0;
            angle1=1.95000;
         };
         class gearA
         {
            type="rotation";
            animperiod = 2;
            selection ="gearA";
            axis = "osa_gearA";
            angle0=0;
            angle1=1.750000;
         };
         class gearR
         {
            type="rotation";
            animperiod = 2;
            selection ="gearR";
            axis = "osa_gearR";
            angle0=0;
            angle1=1.95000;
         };

         class trapA
         {
            type="rotation";
            animperiod = 3;
            selection ="trapA";
            axis = "osa_trapA";
            angle0= 0;
            angle1= +1.6000;
         };

         class trapL
         {
            type="rotation";
            animperiod = 5;
            selection ="trapL";
            axis = "osa_trapL";
            angle0= 0;
            angle1= +1.6000;
         };

         class trapR
         {
            type="rotation";
            animperiod = 5;
            selection ="trapR";
            axis = "osa_trapR";
            angle0= 0;
            angle1= -1.7000;
         };

         class canopy
         {
            type="rotation";
            animperiod = 5;
            selection ="canopy";
            axis = "osa_canopy";
            angle0= 0;
            angle1= -0.39000;
         };
         };
 class UserActions
   {

   class LowerLandingGear
   {
   displayName="Gear Down";
   position="pilot";
   radius=2
   condition= "this animationPhase ""gearA"" >= 0.5 and player in this && (getpos driver this select 2)<170;"
   statement = "[this] exec ""\xplane\sqs\geardn.sqs""";
   };

   class RaiseLandingGear
   {
   displayName="Gear Up";
   position="pilot";
   radius=2
   condition = "this animationPhase ""gearA"" < 0.5 and player in this && (getpos driver this select 2)>70;"
   statement = "[this] exec ""\xplane\sqs\gearup.sqs""";
        };
        class canopyclose
   {
   displayName="Close canopy";
   position="pilot";
   radius=5;
   condition="this animationPhase ""canopy"" >=0.5 and !isengineon this";
   statement= "[this] exec ""\xplane\sqs\doorclose.sqs""";
   };
        class canopyopen
   {
   displayName="Open canopy";
   position="pilot";
   radius=5;
   condition="this animationPhase ""canopy"" <=0.5 and !isengineon this";
   statement= "[this] exec ""\xplane\sqs\dooropen.sqs""";
   };
  };      
  class EventHandlers
      {
               init = [_this select 0] exec "\xplane\sqs\Gearauto.sqs", [_this select 0] exec "\xplane\sqs\door1.sqs";
            };
     };
 };

Offline oyman

  • Members
  • *
  • king of pings
Re:GUN FLASH
« Reply #1 on: 24 Mar 2004, 18:49:40 »
you need a class Cfg Models in that config

Offline Zayfod

  • ECP Team
  • *
  • Llama, softest natural fibre in the world.
Re:GUN FLASH
« Reply #2 on: 24 Mar 2004, 21:39:14 »
Looking good! Great work!

Code: [Select]
     soundEngine[]={"\xplane\fx\eng.wav",db-10,1};
      soundCrash[]={"\xplane\fx\crash.wav",db10,1};
      soundLandCrash[]={"\xplane\fx\touch.wav",db5,1};
      soundWaterCrash[]={"\xplane\fx\crashwater.wav",db10,1};
     

I highly recommend that you use .wss audio files and not .wav :)
"I have come here to kick ass and chew bubble gum......an I'm all outta bubble gum!"

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:GUN FLASH
« Reply #3 on: 24 Mar 2004, 23:20:19 »
Code: [Select]
ok i have done what is sugested but still no chnage gun flash is still on always what could cause this to not to disipare
[code#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TracerNColor 0,0,0
#define TracerNColorF {TracerNColor,0.00}
#define TRACER_N_ALWAYS tracerColor[]=TracerNColorF;tracerColorR[]=TracerNColorF
#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 CfgPatches
{
class xplaneset
   {
      units[] = {xplane};
      weapons[] = {};
      requiredVersion = 1.91;
   };
};
   
class CfgModels
{
   class Default {};
   class Air: default {};
   class xplane: Air
   {
      sectionsInherit="Vehicle";
      sections[]={"vrtule staticka","vrtule blur"};
   };
   class Weapon: default {};
   class sidew: Weapon {};
   class 30mm: Weapon {};
};

class CfgAmmo
{
   class Default {};
   class BulletSingle: default {};
   class ExplosiveBullet: BulletSingle {};
   class Bullet30: ExplosiveBullet {};
   class 30mm: Bullet30
   {
      hit=30;
      indirectHit=25;
      indirectHitRange=6.5;
      minRange=5;minRangeProbab=0.90;
      midRange=450;midRangeProbab=0.99;
      maxRange=1500;maxRangeProbab=0.55;
      cost=6;
      tracerColor[]={0.000000,1.000000,1.000000,1.000000};
      tracerColorR[]={0.000000,1.000000,1.000000,1.000000};   
   };
   class AT3: Default {};
   class CarlGustav: AT3 {};
   class sidew : CarlGustav    
   {
      minRange=100;minRangeProbab=0.8;      
           midRange=500;midRangeProbab=1.0;      
           maxRange=2000;maxRangeProbab=1.0;      
      airLock=1;
      irLock=0;
      initTime=0.5;
      ThrustTime=100;
      thrust=1000;
      maxspeed=1300;
      hit=100;indirectHit=80;indirectHitRange=3;      
      model = "\xplane\sidew.p3d";
      proxyShape="\xplane\sidew.p3d";
      manualControl=0;
      maxControlRange=2000;
      maneuvrability=100.0;
   };
};
class CfgWeapons
{
   class Default {};
        class MGun: Default {};
   class MachineGun7_6: MGun {};
   class MachineGun30: MachineGun7_6 {};
   class 30mm: MachineGun30
   {
      displayName="30mm";
      displayNameMagazine="30mm mag";
      shortNameMagazine="30 mag";
      ammo="30MM";
      nameSound="shell";
      count=1000;
      canLock = 2;
      multiplier=1
      reloadTime=0.025;
      soundContinuous=false;
      initSpeed=900;
      reloadSound[]={"Weapons\reload",0.000316,1};
      drySound[]={"weapons\M16dry",0.003162,1};
      sound[]={"\xplane\fx\gun.wss",5.162278,1};
      flash=gunfire;
      flashSize=12.000000;
      maxLeadSpeed=900;
      aiRateOfFire=0.020;
      aiRateOfFireDistance=10000;
      autoFire=1;
      TRACER_N_ALWAYS;
   };

   class LAWLauncher: Default {};
   class CarlGustavLauncher : LAWLauncher {};
   class AT3Launcher: CarlGustavLauncher {};
   class HellfireLauncher: AT3Launcher {};
   class MaverickLauncher: HellfireLauncher {};

   class sidew_Launcher: MaverickLauncher
   {
      ammo=DKMM_OV10_AIM9L;
      displayName="AIM-9L sidewinder";
      displayNameMagazine="sidewinder";
      shortNameMagazine="AIM-9L";
      magazine="sidew";
      count=6;
      initspeed=15;   
      model = "\xplane\sidew.p3d";
      proxyShape="\xplane\sidew.p3d";
      canLock=2;      
      sound[]={Weapons\Missile,db+18,1};
      aiRateOfFire=8;
      aiRateOfFireDistance=3500;
   };
   
   class ZuniLauncher38: AT3Launcher {};
   class UG : ZuniLauncher38
   {
      opticsZoomMin=0.08;
      opticsZoomMax=0.84;
      scopeWeapon = public;
      scopeMagazine = public;
      displayName="Unguided Rockets";
      displayNameMagazine="UnGRockets";
      shortNameMagazine="UnGRockets";
      count=80;
      reloadTime=0.2;
      initSpeed=0;
      aiRateOfFire=5.0;      
      aiRateOfFireDistance=300;
      minRange=250;minRangeProbab=1;
      midRange=500;midRangeProbab=0.99;
      maxRange=1000;maxRangeProbab=0.95;
   };
};
class CfgVehicles
{
   class All {};
   class AllVehicles: All {};
   class Air: AllVehicles {};
   class Plane: Air {};
   class xplane: Plane
        {
           vehicleClass = "Air";
      crew="SoldierWPilot";
      side=TWest;
      driverAction = ManActA10Pilot;
                accuracy=0.50;
                laserScanner = true;
                armor=50;
                cost=20000000;
                fov=0.5;
                type=VAir;
      landingAoa = 7*3.1415/180;
                extCameraPosition[]={0,2,-30};
                landingSpeed = 200;
                aileronSensitivity = 0.8;
      elevatorSensitivity = 0.8;
      noseDownCoef = 0.8;
           flapsFrictionCoef = 0.8;
      wheelSteeringSensitivity = 1.0;
      brakeDistance=50;
      ejectSpeed[]={0,80,-30};
      precision=200;
                fuelCapacity=1000;
                insideSoundCoef = 0.05;
                nightVision=true;
                gearRetracting = false;
      displayName="xplane";
      irTarget=1;
      irScanRange=4000;
      irScanGround=1500;
                  maxSpeed = 800;
      weapons[]={30mm,sidew_Launcher,UG};
      magazines[]={30mm,sidew_Launcher,UG};
      model="\xplane\xplane";
      scope=2;
      soundEngine[]={"\xplane\fx\eng.wss",db-10,1};
      soundCrash[]={"\xplane\fx\crash.wss",db10,1};
      soundLandCrash[]={"\xplane\fx\touch.wss",db5,1};
      soundWaterCrash[]={"\xplane\fx\crashwater.wss",db10,1};
      animated=1;
      class Animations
      {
      
class gearL {type="rotation";animperiod = 2;selection ="gearL";axis = "osa_gearL";angle0=0;angle1=1.95000;};
class gearA {type="rotation";animperiod = 2;selection ="gearA";axis = "osa_gearA";angle0=0;angle1=1.750000;};
class gearR {type="rotation";animperiod = 2;selection ="gearR";axis = "osa_gearR";angle0=0;angle1=1.95000;};
class trapA {type="rotation";animperiod = 3;selection ="trapA";axis = "osa_trapA";angle0= 0;angle1= +1.6000;};
class trapL {type="rotation";animperiod = 5;selection ="trapL";axis = "osa_trapL";angle0= 0;angle1= +1.6000;};
class trapR {type="rotation";animperiod = 5;selection ="trapR";axis = "osa_trapR";angle0= 0;angle1= -1.7000;};

         class canopy
         {
            type="rotation";
            animperiod = 5;
            selection ="canopy";
            axis = "osa_canopy";
            angle0= 0;
            angle1= -0.39000;
         };
         };
 class UserActions
   {

   class LowerLandingGear
   {
   displayName="Gear Down";
   position="pilot";
   radius=2
   condition= "this animationPhase ""gearA"" >= 0.5 and player in this && (getpos driver this select 2)<170;"
   statement = "[this] exec ""\xplane\sqs\geardn.sqs""";
   };

   class RaiseLandingGear
   {
   displayName="Gear Up";
   position="pilot";
   radius=2
   condition = "this animationPhase ""gearA"" < 0.5 and player in this && (getpos driver this select 2)>70;"
   statement = "[this] exec ""\xplane\sqs\gearup.sqs""";
        };
        class canopyclose
   {
   displayName="Close canopy";
   position="pilot";
   radius=5;
   condition="this animationPhase ""canopy"" >=0.5 and !isengineon this";
   statement= "[this] exec ""\xplane\sqs\doorclose.sqs""";
   };
        class canopyopen
   {
   displayName="Open canopy";
   position="pilot";
   radius=5;
   condition="this animationPhase ""canopy"" <=0.5 and !isengineon this";
   statement= "[this] exec ""\xplane\sqs\dooropen.sqs""";
   };
  };      
  class EventHandlers
      {
               init = [_this select 0] exec "\xplane\sqs\Gearauto.sqs", [_this select 0] exec "\xplane\sqs\door1.sqs";
};
 class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class Proxysidew: ProxyWeapon {model="\xplane\sidew.p3d"; simulation="maverickweapon";};
};
« Last Edit: 25 Mar 2004, 00:15:33 by WizzyWig »

Offline oyman

  • Members
  • *
  • king of pings
Re:GUN FLASH
« Reply #4 on: 24 Mar 2004, 23:50:58 »
try something like this
Code: [Select]
class CfgModels
{
   class Default{};
   class Weapon: Default{};
   class Vehicle: Default{};
   class cessna182: Vehicle {};
   class xplane: cessna182
   {
      sectionsInherit="Vehicle";
      sections[]={"vrtule staticka","vrtule blur"};
   };
   
};

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:GUN FLASH
« Reply #5 on: 25 Mar 2004, 00:04:16 »
ok i have fixed that part now i get

what dose this mean its my first time at adding weapons in this way hope you can help and thanks so far