Jump to content
Sign in to follow this  
bwph4273

need help with muzzle flash not showing

Recommended Posts

I have tried everything I can think of to get it to work so any help would be appreciated . everything else works fine just the muzzle flash doesn't show.

// config.bin by BWPH4273
// 9/21/2010 (uptated to A3 5/16/2014) C-RAM  ver. 2.156 alpha
// work in progress

class CfgPatches {
        class BWPH_C_RAM  {
          units[] = {"C_RAM"};
          requiredVersion = 0.1;
          requiredAddons[] = {};
 };

 };

#include "weapon.hpp" 



class CfgVehicles
{
class All;
class Strategic;
class Land;
class LandVehicle: Land
{
	class ViewPilot;
	class NewTurret;
	class Turrets;
	class Sounds;
	class AnimationSources;
	class EventHandlers;
};
class StaticWeapon: LandVehicle
{
	class Turrets
	{
		class MainTurret: NewTurret
		{
			class ViewOptics{};
		};
	};
};
class StaticMGWeapon: StaticWeapon
{
	class Turrets: Turrets
	{
		class MainTurret: MainTurret
		{
			class ViewOptics;
		};
	};
};
class StaticCannon: StaticWeapon
{
	class ViewOptics;
	class NewTurret;
};
class C_RAM: StaticCannon
{
	hasDriver = 0;
	armor = 20;
	damageResistance = 0.01;
	displayName = "C-RAM";
	icon = "\BWPH_C-RAM\data\ui\cram.paa";
	scope = 2;
	accuracy = 1.5;
	crew = "B_soldier_F";
	faction = "BLU_F";
	side = 1;
	typicalCargo[] = {"B_Soldier_F","B_Soldier_F"};
	hasGunner = 1;
	model = "\BWPH_C-RAM\BWPH_cram";
	canLock = 2;
	laserScanner = "true";
	gunnerCanSee = 31;
	castGunnerShadow = 0;

	class AnimationSources
	{
		class Gatling
		{
			source = "revolving";
			weapon = "c_ram_autocannon";
			animPeriod = 0.01;
		};
		//class c_ram_autocannon_ammorandom
		//{
			//source = "ammorandom";
			//weapon = "c_ram_autocannon";
		//};
		 class Trailerjack
		{
			type="translation";
			source="user";
			selection="t_jack";
			memory=1;
			axis="t_jack_axis";
			begin="t_jack_start";
			end="t_jack_end";
			minValue=0;
			maxValue="1";
			offset0=0;
			offset1=0.7;
			animPeriod=2.5;
		  };
	}; 
	class Turrets: Turrets
	{
		class MainTurret: MainTurret
		{
			gunnerCanSee = 31;
			radarType = 4;
			threat[] = {0.2,0.9,1};
			minTurn = -360;
			maxTurn = 360;
			initTurn = 0;
			minElev = -25;
			maxElev = 100;
			gunnerName = "Gunner";
			primary = 1;
			primaryGunner = 1;
			LockDetectionSystem = "2 + 8 + 4";
	        incomingMissileDetectionSystem = 16;
			startEngine = 0;
			maxHorizontalRotSpeed = 1;
			maxVerticalRotSpeed = 1;
			weapons[] = {"c_ram_autocannon"};
			magazines[] = {"3000Rnd_20mm_HEISD","3000Rnd_20mm_HEISD","3000Rnd_20mm_HEISD"};
			memoryPointGunnerOptics = "gunnerview";
			memoryPointGun = "machinegun_1";
			gunBeg = "gun_1_muzzle";	
			gunEnd = "gun_1_chamber";
			selectionFireAnim = "zasleh";
			memoryPointsGetInGunner = "pos_gunner_dir";
			memoryPointsGetInGunnerDir = "pos_gunner";
			body = "MainTurret";
			gun = "MainGun";
			turretInfoType = "RscOptics_Heli_Attack_01_gunner";
			discreteDistance[] = {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500};
			discreteDistanceInitIndex = 5;	// start at 600 meters
			gunnerOpticsEffect[] = {"TankCommanderOptics1","BWTV"};
			soundServo[] = {"A3\Sounds_F\vehicles\armor\noises\servo_best",1.4125376,1.0,40};
			outGunnerMayFire = 1;
			inGunnerMayFire = 1;
			gunnerForceOptics = 1;
			showGunnerOptics = 1;
			castGunnerShadow = 0;
			gunnerOutForceOptics = 1;
			forceHideGunner = 1;
			stabilizedInAxes = "StabilizedInAxesBoth";
			enableManualFire = 1;
			class ViewOptics: ViewOptics
			{
				 initAngleX = 0;
				      minAngleX = -30;
				      maxAngleX = 30;
				      initAngleY = 0;
				      minAngleY = -100;
				      maxAngleY = 100;
				      initFov = 0.155;
				      minFov = 0.037;
				      maxFov = 0.155;
				      visionMode[] = {"Normal","NVG","Ti"};
				      thermalMode[] = {0, 1, 2, 3, 4, 5};
				      irScanRangeMin = 10;
	                  irScanRangeMax = 10000;
	                  irScanToEyeFactor = 5;
			};
			class OpticsIn
			{
				class Wide: ViewOptics
				{
					opticsDisplayName = "1X";
     						initAngleX = 0;
     						minAngleX = -30;
     						maxAngleX = 30;
     						initAngleY = 0;
     						minAngleY = -100;
     						maxAngleY = 100;
     						initFov = 0.766;
     						minFov = 0.766;
     						maxFov = 0.766;
     						visionMode[] = {"Normal","NVG","Ti"};
     						thermalMode[] = {0, 1, 2, 3, 4, 5};
					gunnerOpticsModel = "\A3\Weapons_F_beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F.p3d";
					gunnerOpticsEffect[] = {};
				};
				class Medium: Wide
				{
					gunnerOpticsModel = "\A3\Weapons_F_beta\Reticle\Heli_Attack_01_Optics_Gunner_medium_F.p3d";
					opticsDisplayName = "10X";
     						initFov = 0.093;
     						minFov = 0.093;
     						maxFov = 0.093;
				};
				class Narrow: Wide
				{
					gunnerOpticsModel = "\A3\Weapons_F_beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F.p3d";
					opticsDisplayName = "50X";
					initFov = 0.029;
     						minFov = 0.029;
     						maxFov = 0.029;
				};
			};
		};
	};

          class UserActions
         {
           class trailerjack_raise
            {
              displayName="raise jack";	
              position="jack"; 
              radius= 0.5;
              condition="this animationPhase ""Trailerjack"" < 0.5";	
              statement="this animate[""Trailerjack"",1]";
              onlyforplayer = false; 
            };
           class trailerjack_lower 
            {
              displayName="lower_jack";
              position="jack";
              radius=0.5;
              condition="this animationPhase ""Trailerjack"" > 0.5";
              statement="this animate[""Trailerjack"",0]";
              onlyforplayer = false; 
            };
        };
    };
};

class CfgAmmo  {
    class B_35mm_AA_Tracer_Red;
    class B_20mm_HEISD: B_35mm_AA_Tracer_Red {
            model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
            scope = 2;
            timeToLive = 5;
            tracerStartTime = 0.005;
            tracerEndTime = 4;
            hit = 100;
	     indirectHit = 45;
	     indirectHitRange = 15;
	     visibleFire = 32;
	     audibleFire = 32;
	     visibleFireTime = 5;
	     explosive = 0.55;
	     airLock = 1;
            soundHit1[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_1",3.1622777,1,1800};
            soundHit2[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_2",3.1622777,1,1800};
            soundHit3[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_3",3.1622777,1,1800};
            soundHit4[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_4",3.1622777,1,1800};
            soundHit5[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_5",3.1622777,1,1800};
            soundHit6[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_6",3.1622777,1,1800};
            multiSoundHit[] = {"soundHit1",0.2,"soundHit2",0.2,"soundHit3",0.2,"soundHit4",0.1,"soundHit5",0.15,"soundHit6",0.15};
            explosionSoundEffect = "DefaultExplosion";
            cost = 50;
            CraterEffects = "ExploAmmoCrater";
            explosionEffects = "ExploAmmoExplosion";
            tracerScale = 1.55;
            airFriction = -0.0005;
            caliber = 2.33;
	     trackLead = 2.5;
            typicalSpeed = 1548;
       class CamShakeExplode {
              power = "(18*0.2)";
              duration = "((round (18^0.5))*0.2 max 0.2)";
              frequency = 20;
              distance = "((1 + 18^0.5)*8)";
      };
        class CamShakeHit {
               power = 19;
               duration = "((round (18^0.25))*0.2 max 0.2)";
               frequency = 20;
               distance = 1;
      };
         class CamShakeFire {
               power = 30;
               duration = "((round (5^0.5))*0.2 max 0.2)";
               frequency = 20;
               distance = "((5^0.5)*8)";
       };
          class CamShakePlayerFire {
            power = 2.0;
            duration = 0.1;
            frequency = 20;
            distance = 1;
       };
     };
   };

class CfgMagazines {
       class 680Rnd_35mm_AA_shells_tracer_red;
       class 3000Rnd_20mm_HEISD: 680Rnd_35mm_AA_shells_tracer_red {
          scope = 2;
          ammo = "B_20mm_HEISD";
          count = 3000;
          tracersEvery = 1;
          displayName = "20mm HEISD";
          initSpeed = 1590;
          maxLeadSpeed = 800;
          nameSound = "cannon";
        };

   };
    class CfgWeapons {
      class CannonCore;
      class autocannon_35mm: CannonCore{};
      class c_ram_autocannon: autocannon_35mm {
             magazines[] = {"3000Rnd_20mm_HEISD"};
             reloadtime = 0.015;
		  scope = 1;
	      airLock = 1;
	      laserLock = 1;
	      irLock = 1;
		  canLock = 2;
		  aiDispersionCoefX = 1;
		  ballisticsComputer = 1;
		  displayName = "M61-A1";
		  shotFromTurret = 1;
	      autoFire = 0;
	      burst = 10;
		  class GunParticles {
		class Effect {
			effectName = "MachineGun2";
			positionName = "gun_1_muzzle";
			directionName = "gun_1_chamber";
		};
		class link {
		 positionName = "eject_point";
            directionName = "eject_dir";
		 effectName = "MachineGunEject";
		};
		class Shell {
		 positionName = "eject_point";
            directionName = "eject_dir";
		 effectName = "MachineGunCartridge2";
		};
	};
	     class GroundEffect1 {
         intensity = 2;
         interval = 1;
         lifetime = 1;
         position[] = {0,0,2};
         simulation = "particles";
         type = "CircleDustTankSmall";
        };
      class manual: CannonCore {
             displayName = "M61-A1";
             sound[] = {"A3\Sounds_F_EPC\Weapons\gau_03_burst",2.5118864,1,4500,{ 25704,32159 }};
		  weaponSoundEffect = "DefaultRifle";
		  soundContinuous = 1;
		  autoFire = 1;
		  flash = "gunfire";
             reloadTime = 0.015;
             dispersion = 0.0001;
             showToPlayer = 1;
		  multiplier = 10;
             burst = 10;
             soundBurst = 0;
             aiRateOfFire = 0.015;
             aiRateOfFireDistance = 50;
             minRange = 1;
             minRangeProbab = 0.01;
             midRange = 2;
             midRangeProbab = 0.01;
             maxRange = 3;
             maxRangeProbab = 0.01;
             textureType = "fullAuto";
      };
             class close: manual {
                  showToPlayer = 0;
                  burst = 15;
                  aiRateOfFire = 0.015;
                  aiRateOfFireDistance = 400;
                  minRange = 0;
                  minRangeProbab = 0.05;
                  midRange = 200;
                  midRangeProbab = 0.58;
                  maxRange = 400;
                  maxRangeProbab = 0.2;
      };
             class short: close {
                  reloadTime = 0.015;
                  soundBurst = 0;
                  aiRateOfFire = 1;
                  aiRateOfFireDistance = 500;
                  minRange = 300;
                  minRangeProbab = 0.2;
                  midRange = 400;
                  midRangeProbab = 0.58;
                  maxRange = 500;
                  maxRangeProbab = 0.2;
      };
             class medium: short {
                   burst = 20;
                   aiRateOfFire = 0.015;
                   aiRateOfFireDistance = 900;
                   minRange = 400;
                   minRangeProbab = 0.2;
                   midRange = 700;
                   midRangeProbab = 0.58;
                   maxRange = 900;
                   maxRangeProbab = 0.2;
      };
             class far: short {
                   burst = 30;
                   aiRateOfFire = 0.015;
                   aiRateOfFireDistance = 1500;
                   minRange = 800;
                   minRangeProbab = 0.2;
                   midRange = 1000;
                   midRangeProbab = 0.4;
                   maxRange = 1500;
                   maxRangeProbab = 0.01;
          };
        };
     };

class CfgSkeletons
{
   class Default
{
	skeletonInherit = "";
	skeletonBones[] = {};
};
class BWPH_cramSkeleton:Default {
	skeletonInherit = "";
	skeletonBones[]=
	{
	"wheel_1_1_damper",	
	"",
	"wheel_1_2_damper",
	"",
	"wheel_2_1_damper",
	"",
	"wheel_2_2_damper",
	"",
	"wheel_1_1",
	"wheel_1_1_damper",
	"wheel_1_2",
	"wheel_1_2_damper",
	"wheel_2_1",
	"wheel_2_1_damper",
	"wheel_2_2",
	"wheel_2_2_damper",
	"t_jack",
	"",
	"mainturret",
	"",
       "maingun","mainturret",
  	    "gatling","maingun",
	"zasleh","maingun",
	"obs_turret",
	"",
	"obs_gun","obs_turret"

	};
};
};
class Rotation;
class CfgModels
{
class Default
{
    isDiscrete = 1;
	sections[] = {};
	sectionsInherit="";
};
class BWPH_cram: Default
{
    sectionsInherit="";
	sections[]=
	{
		"zasleh"
	};
	skeletonName="BWPH_cramSkeleton";
	class Animations
	{
	    class Wheel_1_1
		{
			type="rotationX";
			source="wheel";
			selection="wheel_1_1";
			axis="";
			memory=1;
			sourceAddress="loop";
			minValue=0;
			maxValue=1;
			angle0=0;
			angle1="rad -360";
		};
		class Wheel_1_2: Wheel_1_1
		{
			selection="wheel_1_2";
		};
		class Wheel_2_1: Wheel_1_1
		{
			selection="wheel_2_1";
		};
		class Wheel_2_2: Wheel_1_1
		{
			selection="wheel_2_2";
		};
		class Wheel_1_1_Damper
		{
			type="translationY";
			source="damper";
			selection="wheel_1_1_damper";
			axis="wheel_1_damper_axis";
			minValue=-1;
			maxValue=1;
			offset0= 0;
			offset1=0.02;
			memory=1;
		};
		class Wheel_1_2_Damper: Wheel_1_1_Damper
		{
			selection="wheel_1_2_damper";
			axis="wheel_1_damper_axis";
		};
		class Wheel_2_1_Damper: Wheel_1_1_Damper
		{
			selection="wheel_2_1_damper";
			axis="wheel_2_damper_axis";
		};
		class Wheel_2_2_Damper: Wheel_1_1_Damper
		{
			selection="wheel_2_2_damper";
			axis="wheel_2_damper_axis";
		};
		class mainTurret
		{
			type="rotationY";
               source="MainTurret";
               selection="MainTurret";
               axis="MainTurret_1_axis";
               memory = 1;
               minValue = rad -360;
               maxValue = rad +360;
               angle0="rad -360";
               angle1="rad +360";
		};
		class mainGun
		{
			type="rotationX";
               source="mainGun";
               selection="maingun";
               axis="maingun_1_axis";
               memory = 1;
               minValue = rad -360;
               maxValue = rad +360;
               angle0="rad -360";
               angle1="rad +360";
		};
		class Obs_Turret
		{
			type="rotationY";
			source="obs_Turret";
			 memory = 1;
			selection="obs_turret";
			axis="obs_turret_axis";
			animPeriod=0;
			minValue="rad -360";
			maxValue="rad +360";
			angle0="rad -360";
			angle1="rad +360";
		};
		class Obs_Gun: Obs_Turret
		{
			type="rotationX";
			source="obs_Gun";
			selection="obs_gun";
			axis="obs_gun_axis";
		};
		 class Gatling
           {
              type="rotation";
              source="Gatling";
              selection="gatling";
              axis="gatling_axis";
              animPeriod = 0.001;
              minValue = 0;
              maxValue = 1;
              sourceAddress = 0;
              angle0 = 0.000000;
              angle1 = -1884.955688;
              memory = 1;
		};
		////class muzzleFlashROT
           //{
             //type="rotation";
             //source="c_ram_autocannon_ammorandom";           
             //sourceAddress="loop";     
             //selection="zasleh";       
             //axis="muzzleflash_axis";                 
             //minValue=0;
             //maxValue=4;               
             //angle0="rad 0";
             //angle1="rad 360";
           //};

		class Trailerjack
		{
			type="translation";
			source="user";
			selection="t_jack";
			memory=1;
			axis="t_jack_axis";
			begin="t_jack_start";
			end="t_jack_end";
			minValue=0;
			maxValue="1";
			offset0=0;
			offset1=0.7;
			animPeriod=2.5;
		};
	};
};
};

Share this post


Link to post
Share on other sites

Is there a reason you have "/" in front of the whole muzzleFlashrotation in the model.cfg? The engine won't read those lines of code. Also doublecheck your LODs are using the zasleh and not muzzleFlash.

Share this post


Link to post
Share on other sites

yes I put the "/" in front of it when I was trouble shooting it . with them out the rotation works fine. if I remove the selectionfireanimation and let the proxy just show it rotates and shows fine but doesn't go away its shown all the time but if I leave that in the config it goes away. and yes the zasleh is all correct and I have even tried it as muzzleflash but still doesn't work.

Share this post


Link to post
Share on other sites

How about taking away "zasleh", "maingun". Don't think the zasleh needs to be a bone

Share this post


Link to post
Share on other sites

I have done that . it didn't work .

EDIT. got it working thanks to alexboy

Edited by bwph4273

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×