rjtwins 10 Posted July 30, 2011 Hello all, I just wrote a config for some stuff I'm working on but I keep getting scope errors. If somebody coult take a look at it and tell me whats wrong it would be mutch appriciated. the config : class CfgPatches { class AGM_platform { scope=1; units[]={"AGM_platform"}; weapons[]={}; requiredVersion=1.02; requiredAddons[]={"CAWeapons"}; }; }; class CfgVehicles { class LandVehicle; class StaticWeapon:LandVehicle { class Turrets; }; class StaticATWeapon:StaticWeapon { class Turrets:Turrets { class MainTurret; }; }; class AGM_platform:StaticATWeapon { scope = 1; displayname= AGM_platform; model="\ca\weapons\Metis_AT_13\metis.p3d"; mapSize=1; artilleryScanner=1; ARTY_IsArtyVehicle=0; picture = "\ca\Weapons\data\ico\zu23_CA.paa"; faction = "USMC"; vehicleClass = "Static"; crew = "USMC_Soldier_Pilot"; icon = "\Ca\weapons\Data\map_ico\icomap_zu23_CA.paa"; side = 1; typicalCargo[] = {"USMC_Soldier_Pilot"}; class Library { libTextDesc="$STR_LIB_ZU23"; }; class Turrets:Turrets { class MainTurret:MainTurret { scope=1; weapons[]={"AGMlauncher"}; magazines[]={"100Rnd_AGM"}; gunnerAction="Metis_Gunner"; gunnerOpticsModel="\ca\weapons\2Dscope_Metis"; gunnerOpticsEffect[]={"OpticsCHAbera1","OpticsBlur2"}; minTurn=-180; maxTurn=180; initTurn=5; minElev=-180; maxElev=180; initElev=0; gunnerForceOptics=0; class ViewGunner { initAngleX=5; minAngleX=-180; maxAngleX=180; initAngleY=0; minAngleY=-180; maxAngleY=180; initFov=0.7; minFov=0.25; maxFov=1.1; }; class ViewOptics { initAngleX=5; minAngleX=-180; maxAngleX=180; initAngleY=0; minAngleY=-180; maxAngleY=180; initFov = 0.093; minFov = 0.093; maxFov = 0.093; }; }; }; }; class CfgAmmo { scope=1; class Default; // External class reference class TimeBombCore; // External class reference class MineCore; // External class reference class BulletCore; // External class reference class BombCore; // External class reference class MissileCore { scope=1; }; class MissileBase:MissileCore { scope=1; manualControl=0; maneuvrability=20; maxSpeed=500; simulationStep=0.01; sideAirFriction=0.2; maxControlRange=4000; soundHit[]={"Ca\sounds\Weapons\explosions\explosion_large1",19.95263,1,1800}; soundFly[]={"Ca\sounds\Weapons\explosions\rocket_fly1",0.1,1.5,400}; soundEngine[]={"Ca\sounds\Weapons\explosions\noise",0.003162278,1,50}; supersonicCrackNear[]={"Ca\sounds\Weapons\explosions\supersonic_crack_close",1,1,100}; supersonicCrackFar[]={"Ca\sounds\Weapons\explosions\supersonic_crack_50meters",1,1,250}; CraterEffects="ATMissileCrater"; explosionEffects="ATMissileExplosion"; muzzleEffect="BIS_Effects_Rocket"; effectsMissile="missile4"; deflecting=0; }; class AGM_AG:MissileBase { scope=1; model="\ca\weapons\Hellfire"; proxyShape="\ca\weapons\Hellfire_proxy"; hit=900; indirectHit=50; indirectHitRange=5; cost=10000; maxSpeed=100; irLock=0; laserLock=0; maxControlRange=20000; trackOversteer=1; trackLead=1; maneuvrability=100; timeToLive=1000; simulationStep=0.01; sideAirFriction=0.001; initTime=0; thrustTime=10; thrust=70; fuseDistance=5; effectsMissile="missile2"; whistleDist=4; manualControl=1; }; }; class cfgMagazines { class Default; // External class reference class CA_Magazine : Default { scope=2; value = 1; displayName = ""; model = "\ca\weapons\mag_univ.p3d"; picture = ""; modelSpecial = ""; useAction = 0; useActionTitle = ""; reloadAction = "ManActReloadMagazine"; ammo = ""; count = 30; type = 256; initSpeed = 900; selectionFireAnim = "zasleh"; nameSound = "magazine"; maxLeadSpeed = 23; }; class VehicleMagazine : CA_Magazine { scope=2; type = 0; reloadAction = ""; maxLeadSpeed = 100; }; class 100Rnd_AGM : VehicleMagazine { scope=1; displayName="$STR_MN_AT13"; ammo="AGM_AG"; initSpeed=55.1688; count=100; maxLeadSpeed=10; nameSound="missiles"; }; }; class cfgWeapons { class Default; // External class reference class PistolCore; // External class reference class RifleCore; // External class reference class MGunCore; // External class reference class LauncherCore; // External class reference class GrenadeCore; // External class reference class CannonCore; // External class reference class MissileLauncher:LauncherCore { scope=1; type=65536; reloadTime=0.5; nameSound="MissileLauncher"; cursorAim="\ca\Weapons\Data\clear_empty"; cursor="Missile"; cursorSize=1; }; class AT5Launcher:MissileLauncher { scope=1; displayName="$STR_DN_AT5LAUNCHER"; cursorAim="\ca\Weapons\Data\clear_empty"; cursor="Rocket"; cursorSize=1; minRange=75; minRangeProbab=0.6; midRange=1400; midRangeProbab=0.7; maxRange=4000; maxRangeProbab=0.001; sound[]={"\ca\Sounds\weapons\cannon\Javelin1",31.62278,1,1000}; soundFly[]={"\ca\Sounds\weapons\cannon\rocket_fly1",25.11886,0.8,700}; reloadTime=1; canLock=1; magazineReloadTime=30; magazines[]={"5Rnd_AT5_BRDM2"}; aiRateOfFire=5; aiRateOfFireDistance=1400; }; class AT5LauncherSingle:AT5Launcher { scope=1; magazines[]={"8Rnd_AT5_BMP2"}; reloadTime=90; }; class AGMlauncher:AT5Launcher { scope = 1; displayName = AGM; dexterity = 10; cursor = "Air_E_MG"; cursorAim = "\ca\Weapons\Data\clear_empty"; cursorSize = 1; canLock = 2; autoAimEnabled=true; ballisticsComputer=true; magazines[] = {"100Rnd_AGM"}; reloadTime = 25; ffCount = 1; burst = 1; dispersion = 0.001; minRange = 50; minRangeProbab = 0; midRange = 12000; midRangeProbab = 0; maxRange = 19000; maxRangeProbab = 0; }; }; }; Ty in advance. Rjtwins, Share this post Link to post Share on other sites
[aps]gnat 28 Posted July 31, 2011 My guess; Scope doesn't belong here; class CfgPatches { class AGM_platform { scope=1; And class CfgAmmo { scope=1; Share this post Link to post Share on other sites
rjtwins 10 Posted July 31, 2011 Ty :) Got ik working looks like this now class CfgPatches { class AGM_platform { units[]={"AGM_platform"}; weapons[]={}; requiredVersion=1.02; requiredAddons[]={"CAWeapons"}; }; }; class CfgVehicles { class LandVehicle; class StaticWeapon:LandVehicle { class Turrets; }; class StaticATWeapon:StaticWeapon { class Turrets:Turrets { class MainTurret; }; }; class AGM_platform:StaticATWeapon { scope=2; displayname= AGM_platform; model="\ca\weapons\Metis_AT_13\metis.p3d"; mapSize=1; artilleryScanner=1; ARTY_IsArtyVehicle=0; picture = "\ca\Weapons\data\ico\zu23_CA.paa"; faction = "USMC"; vehicleClass = "Static"; crew = "USMC_Soldier_Pilot"; icon = "\Ca\weapons\Data\map_ico\icomap_zu23_CA.paa"; side = 1; typicalCargo[] = {"USMC_Soldier_Pilot"}; class Library { libTextDesc="$STR_LIB_ZU23"; }; class Turrets:Turrets { class MainTurret:MainTurret { weapons[]={"AGMLauncher"}; magazines[]={"100Rnd_AGM"}; gunnerAction="Metis_Gunner"; gunnerOpticsModel="\ca\weapons\2Dscope_Metis"; gunnerOpticsEffect[]={"OpticsCHAbera1","OpticsBlur2"}; minTurn=-180; maxTurn=180; initTurn=5; minElev=-180; maxElev=180; initElev=0; gunnerForceOptics=0; class ViewGunner { initAngleX=5; minAngleX=-180; maxAngleX=180; initAngleY=0; minAngleY=-180; maxAngleY=180; initFov=0.7; minFov=0.25; maxFov=1.1; }; class ViewOptics { initAngleX=5; minAngleX=-180; maxAngleX=180; initAngleY=0; minAngleY=-180; maxAngleY=180; initFov = 0.093; minFov = 0.093; maxFov = 0.093; }; }; }; }; }; class CfgAmmo { class Default; class TimeBombCore; class MineCore; class BulletCore; class BombCore; class RocketCore; class MissileCore; class MissileBase:MissileCore { manualControl=0; maneuvrability=20; maxSpeed=500; simulationStep=0.01; sideAirFriction=0.2; maxControlRange=4000; soundHit[]={"Ca\sounds\Weapons\explosions\explosion_large1",19.95263,1,1800}; soundFly[]={"Ca\sounds\Weapons\explosions\rocket_fly1",0.1,1.5,400}; soundEngine[]={"Ca\sounds\Weapons\explosions\noise",0.003162278,1,50}; supersonicCrackNear[]={"Ca\sounds\Weapons\explosions\supersonic_crack_close",1,1,100}; supersonicCrackFar[]={"Ca\sounds\Weapons\explosions\supersonic_crack_50meters",1,1,250}; CraterEffects="ATMissileCrater"; explosionEffects="ATMissileExplosion"; muzzleEffect="BIS_Effects_Rocket"; effectsMissile="missile4"; deflecting=0; }; class M_Hellfire_AT:MissileBase { model="\ca\weapons\Hellfire"; proxyShape="\ca\weapons\Hellfire_proxy"; hit=800; indirectHit=20; indirectHitRange=2; cost=10000; maxSpeed=425; irLock=1; laserLock=1; maxControlRange=8000; trackOversteer=1; trackLead=1; maneuvrability=9; timeToLive=20; simulationStep=0.01; sideAirFriction=0.2; initTime=0; thrustTime=3.25; thrust=130; fuseDistance=5; effectsMissile="missile2"; whistleDist=4; }; class M_AGM:M_Hellfire_AT { model="\ca\weapons\Hellfire"; proxyShape="\ca\weapons\Hellfire_proxy"; hit=950; indirectHit=75; indirectHitRange=5; cost=1; maxSpeed=100; irLock=1; laserLock=1; maxControlRange=10000; trackOversteer=1; trackLead=1; maneuvrability=15; timeToLive=120; simulationStep=0.01; sideAirFriction=0.9; initTime=0; thrustTime=119; thrust=250; fuseDistance=20; effectsMissile="missile2"; whistleDist=4; }; }; class CfgMagazines { class Default; class CA_Magazine:Default { scope=1; value=1; displayName=""; model="\ca\weapons\mag_univ.p3d"; picture=""; modelSpecial=""; useAction=0; useActionTitle=""; reloadAction="ManActReloadMagazine"; ammo=""; count=30; type=256; initSpeed=900; selectionFireAnim="zasleh"; nameSound="magazine"; maxLeadSpeed=23; }; class VehicleMagazine:CA_Magazine { type=0; reloadAction=""; maxLeadSpeed=100; }; class 8Rnd_Hellfire:VehicleMagazine { scope=2; displayName="$STR_DN_HELLFIRE"; count=8; ammo="M_Hellfire_AT"; initSpeed=0; maxLeadSpeed=200; sound[]={"\ca\Weapons\Data\Sound\TOW_2",3.162278,1,1400}; reloadSound[]={"\ca\Weapons\Data\Sound\missload",0.0003162278,1,20}; nameSound="missiles"; }; class 100Rnd_AGM:8Rnd_Hellfire { scope=2; displayName="$STR_DN_HELLFIRE"; count=100; ammo="M_AGM"; initSpeed=0; maxLeadSpeed=200; sound[]={"\ca\Weapons\Data\Sound\TOW_2",3.162278,1,1400}; reloadSound[]={"\ca\Weapons\Data\Sound\missload",0.0003162278,1,20}; nameSound="missiles"; }; }; class cfgWeapons { class Default; class PistolCore; class RifleCore; class MGunCore; class LauncherCore; class GrenadeCore; class CannonCore; class Launcher:LauncherCore { cursorAim="\ca\Weapons\Data\clear_empty"; cursor="Rocket"; cursorSize=1; autoAimEnabled=0; opticsDisablePeripherialVision=1; magazines[]={}; value=10; nameSound="atlauncher"; magazineReloadTime=12; reloadTime=0; sound[]={"\ca\Weapons\Data\Sound\at7_RocketLauncher_Shot1",0.01,1,1400}; initSpeed=30; canLock=0; reloadAction="ManActReloadAT"; autoReload=0; ffMagnitude=0.1; ffFrequency=1; ffCount=1; recoil="LAWSingle"; aiRateOfFire=10; aiRateOfFireDistance=500; optics=1; primary=0; opticsZoomMin=0.25; opticsZoomMax=1.1; opticsZoomInit=0.5; distanceZoomMin=100; distanceZoomMax=100; minRange=20; minRangeProbab=0.3; midRange=150; midRangeProbab=0.58; maxRange=500; maxRangeProbab=0.04; UiPicture="\CA\weapons\data\Ico\i_at_CA.paa"; }; class MissileLauncher:LauncherCore { scope=1; type=65536; reloadTime=0.5; nameSound="MissileLauncher"; cursorAim="\ca\Weapons\Data\clear_empty"; cursor="Missile"; cursorSize=1; }; class HellfireLauncher:MissileLauncher { displayName="$STR_DN_HELLFIRE"; minRange=50; minRangeProbab=0.6; midRange=2000; midRangeProbab=0.9; maxRange=4000; maxRangeProbab=0.1; sound[]={"\ca\Sounds\weapons\cannon\RocketLauncher_Shot05",31.62278,1,1100}; soundFly[]={"\ca\Sounds\weapons\cannon\rocket_fly1",100,0.8,800}; reloadTime=1; magazines[]={"8Rnd_Hellfire"}; aiRateOfFire=5; aiRateOfFireDistance=4000; cursorAim="\ca\Weapons\Data\clear_empty"; cursor="Laser"; cursorSize=1; }; class AGMLauncher:HellfireLauncher { displayName="$STR_DN_HELLFIRE"; minRange=50; minRangeProbab=0.6; midRange=2000; midRangeProbab=0.9; maxRange=4000; maxRangeProbab=0.1; sound[]={"\ca\Sounds\weapons\cannon\RocketLauncher_Shot05",31.62278,1,1100}; soundFly[]={"\ca\Sounds\weapons\cannon\rocket_fly1",100,0.8,800}; reloadTime=1; magazines[]={"100Rnd_AGM"}; aiRateOfFire=5; aiRateOfFireDistance=4000; cursorAim="\ca\Weapons\Data\clear_empty"; cursor="Laser"; cursorSize=1; }; }; I have a question thought. As you can see I'm trying to make a missle, I wan't it to fly real slow and be real agile. The problem is it just falles to the ground afther I fire it... whats the problem ? Share this post Link to post Share on other sites
.kju 3245 Posted July 31, 2011 Proper config would be: class CfgPatches { class YourTAG_AGM_platform { units[] = {"YourTAG_AGM_platform"}; weapons[] = {"YourTAG_AGMLauncher"}; requiredVersion = 1.02; requiredAddons[] = {"CAWeapons"}; }; }; class CfgAmmo { class M_Hellfire_AT; class M_AGM_YourTAG: M_Hellfire_AT { hit = 950; indirectHit = 75; indirectHitRange = 5; cost = 1; maxSpeed = 100; maxControlRange = 10000; maneuvrability = 15; timeToLive = 120; simulationStep = 0.01; sideAirFriction = 0.9; thrustTime = 119; thrust = 250; fuseDistance = 20; }; }; class CfgMagazines { class 8Rnd_Hellfire; class 100Rnd_AGM_YourTAG: 8Rnd_Hellfire { count = 100; ammo = "M_AGM_YourTAG"; }; }; class cfgWeapons { class HellfireLauncher; class YourTAG_AGMLauncher: HellfireLauncher { magazines[] = {"100Rnd_AGM_YourTAG"}; }; }; class CfgVehicles { class LandVehicle; class StaticWeapon: LandVehicle { class Turrets; }; class StaticATWeapon: StaticWeapon { class Turrets: Turrets { class MainTurret; }; }; class YourTAG_AGM_platform: StaticATWeapon { scope = 2; displayname = "AGM platform"; model = "\ca\weapons\Metis_AT_13\metis.p3d"; mapSize = 1; artilleryScanner = 1; ARTY_IsArtyVehicle = 0; picture = "\ca\Weapons\data\ico\zu23_CA.paa"; faction = "USMC"; vehicleClass = "Static"; crew = "USMC_Soldier_Pilot"; icon = "\Ca\weapons\Data\map_ico\icomap_zu23_CA.paa"; side = 1; typicalCargo[] = {"USMC_Soldier_Pilot"}; class Library { libTextDesc = "$STR_LIB_ZU23"; }; class Turrets: Turrets { class MainTurret: MainTurret { weapons[] = {"YourTAG_AGMLauncher"}; magazines[] = {"100Rnd_AGM_YourTAG"}; gunnerAction = "Metis_Gunner"; gunnerOpticsModel = "\ca\weapons\2Dscope_Metis"; gunnerOpticsEffect[] = {"OpticsCHAbera1","OpticsBlur2"}; minTurn = -180; maxTurn = 180; initTurn = 5; minElev = -180; maxElev = 180; initElev = 0; gunnerForceOptics = 0; class ViewGunner { initAngleX = 5; minAngleX = -180; maxAngleX = 180; initAngleY = 0; minAngleY = -180; maxAngleY = 180; initFov = 0.7; minFov = 0.25; maxFov = 1.1; }; class ViewOptics { initAngleX = 5; minAngleX = -180; maxAngleX = 180; initAngleY = 0; minAngleY = -180; maxAngleY = 180; initFov = 0.093; minFov = 0.093; maxFov = 0.093; }; }; }; }; }; Share this post Link to post Share on other sites
rjtwins 10 Posted July 31, 2011 That what not what I ment... its was a problem with the right thrust. Let me explain what I'm making. I'm trying to create the AGM missle from COD 4. The problem is that the missles from arma don't fly (around 3 sec) but fall to there target witch makes steering via camera control very very hard. Another problem is that if you set the thrust very long or high the missle will go realy fast and that makes spotting the target before the missle hits it very hard. Also I have another question on target spotting, when your in the A10 and look throught the HUD you see squares around units on the ground. Is there a way to make that screenwide ? I'm using the TV guided bomb script from (forgot who). Share this post Link to post Share on other sites