Jump to content

rjtwins

Member
  • Content Count

    38
  • Joined

  • Last visited

  • Medals

Posts posted by rjtwins


  1. I've got it working.

    script :

    //wmdWeaponSpawn.sqf//
    //////////////////////////////////////////////////////////////////////////////////////////
    //Put the following in the INI field of the soldier you want to template to apply to.	//
    //handle = [this, "classname"] execVM "wmdWeaponSpawnWorking.sqf";						//
    //clasenames : 																			//
    //sl : Squad leader																		//
    //rifle : Atandart rifleman																//
    //autorifle : Automatic rifleman (support gunner)										//
    //at : Anti tank specialist																//
    //medic : Medic																			//
    //explosive : Explosives specialist														//
    //marksman : Ranged rifleman/sniper (uses EBR)											//
    //repair : Repair spacialist															//
    //////////////////////////////////////////////////////////////////////////////////////////
    
    
    waitUntil {!isNull player};
    _unit = _this select 0;
    _type = _this select 1;
    
    
    removeAllItems _unit;
    removeAllWeapons _unit;
    removeVest _unit;
    removeUniform _unit;
    removeBackpack _unit;
    removeHeadgear _unit;
    
    switch (_type) do {
    case "sl":{
    _unit addUniform "U_B_CombatUniform_mcam";
    _unit addVest "V_PlateCarrier1_cbr"; 
    _unit addbackpack "B_Carryall_ocamo";
    _unit addHeadgear "H_HelmetB_light";
    clearAllItemsFromBackpack _unit;
    {_unit removeMagazine _x} forEach magazines _unit; 
    _unit addMagazine "20Rnd_762x45_Mag"; 
    _unit addWeapon "srifle_EBR_Hamr_point_grip_F";
    _unit addPrimaryWeaponItem "muzzle_snds_B";
    bp = unitBackpack _unit; 
    bp addMagazineCargoGlobal["20Rnd_762x45_Mag",15];
    _unit addMagazine "HandGrenade";
    _unit addMagazine "HandGrenade";
    _unit addMagazine "HandGrenade";
    _unit addMagazine "HandGrenade";
    _unit addMagazine "HandGrenade";
    _unit addMagazine "HandGrenade";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    };
    
    case "rifle":{
    _unit addUniform "U_B_CombatUniform_mcam";
    _unit addVest "V_PlateCarrier1_cbr"; 
    _unit addbackpack "B_Carryall_ocamo";
    _unit addHeadgear "H_HelmetB_light";
    clearAllItemsFromBackpack _unit;
    {_unit removeMagazine _x} forEach magazines _unit; 
    _unit addMagazine "30Rnd_65x39_caseless_mag"; 
    _unit addWeapon "arifle_MX_F"; 
    _unit addPrimaryWeaponItem "optic_Aco"; 
    _unit addPrimaryWeaponItem "muzzle_snds_H";
    bp = unitBackpack _unit; 
    bp addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag",10];
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addMagazine "HandGrenade";
    };
    
    case "autorifle":{
    _unit addUniform "U_B_CombatUniform_mcam_tshirt";
    _unit addVest "V_PlateCarrier1_cbr"; 
    _unit addbackpack "B_Carryall_ocamo";
    _unit addHeadgear "H_HelmetB_light"; 
    clearAllItemsFromBackpack _unit;
    {_unit removeMagazine _x} forEach magazines _unit;
    unitbackpack _unit addMagazineCargoGlobal ["200Rnd_65x39_cased_Box_Tracer",10];
    _unit addWeapon "LMG_Mk200_F";
    _unit addPrimaryWeaponItem "optic_Hamr"; 
    _unit addPrimaryWeaponItem "muzzle_snds_H_MG";
    unitbackpack _unit addWeapon "MineDetector";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addMagazine "HandGrenade";
    };
    
    case "at":{
    _unit addUniform "U_B_CombatUniform_mcam";
    _unit addVest "V_PlateCarrier1_cbr"; 
    _unit addbackpack "B_Carryall_ocamo";
    _unit addHeadgear "H_HelmetB_light";
    clearAllItemsFromBackpack _unit;
    {_unit removeMagazine _x} forEach magazines _unit; 
    _unit addWeapon "arifle_MX_F"; 
    _unit addPrimaryWeaponItem "optic_Aco"; 
    _unit addPrimaryWeaponItem "muzzle_snds_H";
    _unit addWeapon "launch_NLAW_F";
    _bp = unitBackpack _unit; 
    _bp addMagazineCargoGlobal ["100Rnd_65x39_caseless_mag_Tracer",10];
    _bp addMagazineCargoGlobal ["NLAW_F", 4];
    };
    
    case "medic":{
    _unit addUniform "U_B_CombatUniform_mcam";
    _unit addVest "V_PlateCarrier1_cbr"; 
    _unit addbackpack "B_Carryall_ocamo";
    _unit addHeadgear "H_HelmetB_light";
    clearAllItemsFromBackpack _unit;
    {_unit removeMagazine _x} forEach magazines _unit; 
    _unit addMagazine "30Rnd_65x39_caseless_mag"; 
    _unit addWeapon "arifle_MX_F"; 
    _unit addPrimaryWeaponItem "optic_Aco"; 
    _unit addPrimaryWeaponItem "muzzle_snds_H";
    bp = unitBackpack _unit; 
    bp addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag",10];
    _unit addItem "Medikit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    };
    
    case "explosive":{
    _unit addUniform "U_B_CombatUniform_mcam";
    _unit addVest "V_PlateCarrier1_cbr"; 
    _unit addbackpack "B_Carryall_ocamo";
    _unit addHeadgear "H_HelmetB_light";
    clearAllItemsFromBackpack _unit;
    {_unit removeMagazine _x} forEach magazines _unit; 
    _unit addMagazine "30Rnd_65x39_caseless_mag"; 
    _unit addWeapon "arifle_MX_F"; 
    _unit addPrimaryWeaponItem "optic_Aco"; 
    _unit addPrimaryWeaponItem "muzzle_snds_H";
    bp = unitBackpack _unit; 
    bp addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag",10];
    _unit addItem "Toolkit";
    _unit addWeapon "MineDetector";
    _unit addMagazine "DemoCharge_Remote_Mag";
    _unit addMagazine "DemoCharge_Remote_Mag";
    _unit addMagazine "DemoCharge_Remote_Mag";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addMagazine "HandGrenade";
    };
    
    case "marksman":{
    _unit addUniform "U_B_CombatUniform_mcam";
    _unit addVest "V_PlateCarrier1_cbr"; 
    _unit addbackpack "B_Carryall_ocamo";
    _unit addHeadgear "H_HelmetB_light";
    clearAllItemsFromBackpack _unit;
    {_unit removeMagazine _x} forEach magazines _unit;   
    _unit addMagazine "30Rnd_65x39_caseless_mag"; 
    _unit addMagazine "20Rnd_762x45_Mag"; 
    _unit addWeapon "srifle_EBR_Hamr_point_grip_F";
    _unit addPrimaryWeaponItem "muzzle_snds_B";
    bp = unitBackpack _unit; 
    bp addMagazineCargoGlobal["20Rnd_762x45_Mag",15];
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addMagazine "HandGrenade";
    };
    
    case "repair":{
    _unit addUniform "U_B_CombatUniform_mcam";
    _unit addVest "V_PlateCarrier1_cbr"; 
    _unit addbackpack "B_Carryall_ocamo";
    _unit addHeadgear "H_HelmetB_light";
    clearAllItemsFromBackpack _unit;
    {_unit removeMagazine _x} forEach magazines _unit; 
    _unit addMagazine "30Rnd_65x39_caseless_mag"; 
    _unit addWeapon "arifle_MX_F"; 
    _unit addPrimaryWeaponItem "optic_Aco"; 
    _unit addPrimaryWeaponItem "muzzle_snds_H";
    bp = unitBackpack _unit; 
    bp addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag",10];
    _unit addItem "Toolkit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";
    _unit addMagazine "HandGrenade";
    };
    };
    
    sleep 5;
    
    weaponsvar = weapons player;
    magazinesvar = magazines player;
    vestvar = vest player;
    uniformvar = uniform player;
    headgearvar = headgear player;
    backpackvar = backpack player;
    primaccvar = primaryWeaponItems player; 
    secaccvar = secondaryWeaponItems player;
    itemsvar = items player;
    assitemsvar = assignedItems player;
    hint "loadout saved";
    
    while {true} do {
    waitUntil {!alive player};
    waitUntil {alive player};
    
    removeAllItems player;
    removeAllWeapons player;
    removeAllAssignedItems player;
    removeAllContainers player;
    
    player addBackpack backpackvar;
    player addVest vestvar;
    player addUniform uniformvar;
    player addHeadgear headgearvar;
    
    {player addItem _x} forEach itemsvar;
    {player addMagazine _x} forEach magazinesvar;
    {player addWeapon _x} forEach weaponsvar;
    {player addPrimaryWeaponItem _x} forEach primaccvar;
    {player addSecondaryWeaponItem _x} forEach secaccvar;
    {player addItem _x} forEach assitemsvar;
    {player assignItem _x} forEach assitemsvar;
    hint "Loadout Restored";
    
    _primw = primaryWeapon player;
    if (_primw != "") then {
       player selectWeapon _primw;
       // Fix for weapons with grenade launcher
       _muzzles = getArray(configFile>>"cfgWeapons" >> _primw >> "muzzles");
       player selectWeapon (_muzzles select 0);
    };
    };
    


  2. Hello,...

    I'm working on a script to spawm units with basic templates and respawm them with the template given in via a sqf file.

    My code so far

    _u = player;
    
    removeAllItems _u;
    removeAllWeapons _u;
    removeVest _u;
    removeUniform _u;
    removeBackpack _u;
    
    _u addUniform "U_B_CombatUniform_mcam";
    _u addVest "V_TacVest_oli";
    _u addbackpack "B_Carryall_ocamo";
    
    clearAllItemsFromBackpack _u;
    {_u removeMagazine _x} forEach magazines _u;
    
    unitbackpack _U addMagazineCargoGlobal ["20Rnd_762x45_Mag",15];
    _u addWeapon "srifle_EBR_Hamr_point_grip_F";
    _u addPrimaryWeaponItem "muzzle_snds_B";
    
    _urimw = primaryWeapon _u;
    if (_urimw != "") then {
       _u selectWeapon _urimw;
       // Fix for weapons with grenade launcher
       _muzzles = getArray(configFile>>"cfgWeapons" >> _urimw >> "muzzles");
       _u selectWeapon (_muzzles select 0);
    };
    
    waitUntil {!alive player};
    waitUntil {alive player};
    
    _u = player;
    
    player execVM "Marksman.sqf";

    and

    _g = player;
    
    removeAllItems _g;
    removeAllWeapons _g;
    removeVest _g;
    removeUniform _g;
    removeBackpack _g;
    
    _g addUniform "U_B_CombatUniform_gcam";
    _g addVest "V_TacVest_oli";
    _g addbackpack "B_Carryall_ocamo";
    
    clearAllItemsFromBackpack _g;
    {_g removeMagazine _x} forEach magazines _g;
    
    unitbackpack _g addMagazineCargoGlobal ["200Rnd_65x39_cased_Box_Tracer",5];
    _g addWeapon "LMG_gk200_COWS_pointer_bipod_F";
    _g addPrimaryWeaponItem "optic_Hamr";
    
    
    _grimw = primaryWeapon _g;
    if (_grimw != "") then {
       _g selectWeapon _grimw;
       // Fix for weapons with grenade launcher
       _guzzles = getArray(configFile>>"cfgWeapons" >> _grimw >> "muzzles");
       _g selectWeapon (_guzzles select 0);
    };
    
    waitUntil {!alive player};
    waitUntil {alive player};
    
    _g = player;
    
    player execVM "SupportGunner.sqf";

    I emply the script by executing it by putting _handle = player execVM "the file" in the init of the unit wich is recieving the template.

    Its all running just fine while i'm on my own in a server but....

    When I enable both scripts ingame, so I put _handle = player execVM "file for gunner" in one units init and _handle = player execVM "file for marksman" in the other. It for some reason overides the gunner and both players spawn as marksman.

    WHY ???

    Can sombody help me out here please ?

    Greatings,

    rj twins


  3. Hello all

    I'm (trying) to make a controllable bullet with bullitime.

    The problem is that for the bullet to be controlable it must be a missle.

    class CfgPatches {
    class SmartAmmo {
    	units[] = {"M107"};
    	weapons[] = {};
    	requiredVersion = 0.1;
    	requiredAddons[] = {"CAWeapons"};
    };
    };
    
    class CfgWeapons
    {
    class Rifle;
    class m107:Rifle
    {
    	scope=2;
    	type=5;
    	model="\ca\weapons\m107\m107";
    	picture="\CA\weapons\data\Equip\W_m107_CA.paa";
    	UiPicture="\CA\weapons\data\Ico\i_sniper_CA.paa";
    	magazines[]={"10Rnd_127x99_m107", "1Rnd_127x99smart_m107"};
    	dexterity=0.45;
    	modelOptics="\ca\Weapons\2Dscope_MilDot_14";
    	opticsPPEffects[]={"OpticsCHAbera1","OpticsBlur1"};
    	opticsFlare=1;
    	opticsDisablePeripherialVision=1;
    	opticsZoomInit=0.0553;
    	opticsZoomMin=0.0178;
    	distanceZoomMin=500;
    	opticsZoomMax=0.0553;
    	distanceZoomMax=200;
    	displayname="$STR_DN_M107";
    	autoFire=0;
    	begin1[]={"ca\sounds\weapons\rifles\m107",2.511886,1,1300};
    	soundBegin[]={"begin1",1};
    	reloadMagazineSound[]={"ca\sounds\weapons\rifles\reload-m16-2",0.03162277,1,20};
    	reloadTime=0.5;
    	dispersion=0.0005;
    	minRange=0;
    	minRangeProbab=0.1;
    	midRange=1200;
    	midRangeProbab=0.7;
    	maxRange=1800;
    	maxRangeProbab=0.05;
    	recoil="recoil_single_primary_9outof10";
    	recoilProne="recoil_single_primary_prone_7outof10";
    	class Library
    	{
    		libTextDesc="$STR_LIB_M107";
    	};
    	descriptionShort="$STR_DSS_M107";
    };
    };
    
    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 10Rnd_127x99_m107:CA_Magazine
    {
    	scope=2;
    	displayName="$STR_MN_10RND_M107";
    	ammo="B_127x99_Ball_noTracer";
    	count=10;
    	initSpeed=850;
    	picture="\CA\weapons\data\Equip\M_107_CA.paa";
    	descriptionShort="$STR_DSS_10RND_M107";
    };
    
           	class 1Rnd_127x99smart_m107:10Rnd_127x99_m107
    {
    	scope=2;
    	displayName="1Rnd 127x99 smart";
    	ammo="B_127x99_Ball_Smart";
    	count=1;
    	initSpeed=750;
    	picture="\CA\weapons\data\Equip\M_107_CA.paa";
    	descriptionShort="$STR_DSS_10RND_M107";
    };
    };
    
    class CfgAmmo
    {
    class Default;
    class TimeBombCore;
    class MineCore;
    class BulletCore;
    class BombCore;
    
       	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_Maverick_AT:MissileBase
    {
    	model="\ca\a10\agm65_fly";
    	proxyShape="\ca\a10\agm65";
    	hit=850;
    	indirectHit=20;
    	indirectHitRange=2;
    	cost=10000;
    	irLock=1;
    	maxControlRange=27000;
    	initTime=0.15;
    	trackOversteer=1;
    	trackLead=1;
    	timeToLive=120;
    	maneuvrability=8;
    	simulationStep=0.01;
    	sideAirFriction=0.2;
    	maxSpeed=300;
    	thrustTime=2;
    	thrust=141;
    	effectsMissile="missile4";
    	whistleDist=4;
    };
    
           	class B_127x99_Ball_Smart:M_Maverick_AT
    {
    	model="\ca\Weapons\shell";
           cartridge="FxCartridge_127";
    	proxyShape="";
    	hit=850;
    	indirectHit=0;
    	indirectHitRange=0;
    	cost=5;
    	irLock=0;
    	maxControlRange=27000;
    	initTime=0.0001;
    	trackOversteer=1;
    	trackLead=1;
    	timeToLive=120;
    	maneuvrability=200;
    	simulationStep=0.01;
    	sideAirFriction=0.2;
    	maxSpeed=300;
    	thrustTime=500;
    	thrust=10;
           explosive=0;        
           effectsMissile="";
           whistleDist=4;
    
           soundFly[]={"",1E-08,1};
    	soundDefault1[]={"ca\sounds\weapons\hits\hit_concrete_01",0.3162278,1,60};
    	soundDefault2[]={"ca\sounds\weapons\hits\hit_concrete_02",0.3162278,1,60};
    	soundDefault3[]={"ca\sounds\weapons\hits\hit_concrete_03",0.3162278,1,60};
    	soundDefault4[]={"ca\sounds\weapons\hits\hit_concrete_04",0.3162278,1,60};
    	soundDefault5[]={"ca\sounds\weapons\hits\rico_hit_concrete_01",0.3162278,1,60};
    	soundDefault6[]={"ca\sounds\weapons\hits\rico_hit_concrete_02",0.3162278,1,60};
    	soundDefault7[]={"ca\sounds\weapons\hits\rico_hit_concrete_03",0.3162278,1,60};
    	soundDefault8[]={"ca\sounds\weapons\hits\rico_hit_concrete_04",0.3162278,1,60};
    	soundGroundSoft1[]={"ca\sounds\weapons\hits\hit_earth_01",0.05623413,1,60};
    	soundGroundSoft2[]={"ca\sounds\weapons\hits\hit_earth_02",0.05623413,1,60};
    	soundGroundSoft3[]={"ca\sounds\weapons\hits\hit_earth_03",0.05623413,1,60};
    	soundGroundSoft4[]={"ca\sounds\weapons\hits\hit_earth_04",0.05623413,1,60};
    	soundGroundSoft5[]={"ca\sounds\weapons\hits\rico_hit_earth_01",0.05623413,1,60};
    	soundGroundSoft6[]={"ca\sounds\weapons\hits\rico_hit_earth_02",0.05623413,1,60};
    	soundGroundSoft7[]={"ca\sounds\weapons\hits\rico_hit_earth_03",0.05623413,1,60};
    	soundGroundSoft8[]={"ca\sounds\weapons\hits\rico_hit_earth_04",0.05623413,1,60};
    	soundGroundHard1[]={"ca\sounds\weapons\hits\hit_concrete_01",0.1258925,1,80};
    	soundGroundHard2[]={"ca\sounds\weapons\hits\hit_concrete_02",0.1258925,1,80};
    	soundGroundHard3[]={"ca\sounds\weapons\hits\hit_concrete_03",0.1258925,1,80};
    	soundGroundHard4[]={"ca\sounds\weapons\hits\hit_concrete_04",0.1258925,1,80};
    	soundGroundHard5[]={"ca\sounds\weapons\hits\rico_hit_concrete_01",0.1258925,1,80};
    	soundGroundHard6[]={"ca\sounds\weapons\hits\rico_hit_concrete_02",0.1258925,1,80};
    	soundGroundHard7[]={"ca\sounds\weapons\hits\rico_hit_concrete_03",0.1258925,1,80};
    	soundGroundHard8[]={"ca\sounds\weapons\hits\rico_hit_concrete_04",0.1258925,1,80};
    	soundMetal1[]={"ca\sounds\weapons\hits\hit_metalplate_01",0.3162278,1,90};
    	soundMetal2[]={"ca\sounds\weapons\hits\hit_metalplate_02",0.3162278,1,90};
    	soundMetal3[]={"ca\sounds\weapons\hits\hit_metalplate_03",0.3162278,1,90};
    	soundMetal4[]={"ca\sounds\weapons\hits\hit_metalplate_04",0.3162278,1,90};
    	soundMetal5[]={"ca\sounds\weapons\hits\hit_metalplate_05",0.3162278,1,90};
    	soundMetal6[]={"ca\sounds\weapons\hits\hit_metalplate_06",0.3162278,1,90};
    	soundMetal7[]={"ca\sounds\weapons\hits\hit_metalplate_07",0.3162278,1,90};
    	soundMetal8[]={"ca\sounds\weapons\hits\hit_metalplate_08",0.3162278,1,90};
    	soundMetal9[]={"ca\sounds\weapons\hits\rico_hit_metalplate_01",0.3162278,1,90};
    	soundMetal10[]={"ca\sounds\weapons\hits\rico_hit_metalplate_02",0.3162278,1,90};
    	soundMetal11[]={"ca\sounds\weapons\hits\rico_hit_metalplate_03",0.3162278,1,90};
    	soundMetal12[]={"ca\sounds\weapons\hits\rico_hit_metalplate_04",0.3162278,1,90};
    	soundGlass1[]={"ca\sounds\weapons\hits\hit_glass_01",0.1778279,1,50};
    	soundGlass2[]={"ca\sounds\weapons\hits\hit_glass_02",0.1778279,1,50};
    	soundGlass3[]={"ca\sounds\weapons\hits\hit_glass_03",0.1778279,1,50};
    	soundGlass4[]={"ca\sounds\weapons\hits\hit_glass_04",0.1778279,1,50};
    	soundGlass5[]={"ca\sounds\weapons\hits\hit_glass_05",0.1778279,1,50};
    	soundGlass6[]={"ca\sounds\weapons\hits\hit_glass_06",0.1778279,1,50};
    	soundGlass7[]={"ca\sounds\weapons\hits\hit_glass_07",0.1778279,1,50};
    	soundGlass8[]={"ca\sounds\weapons\hits\hit_glass_08",0.1778279,1,50};
    	soundGlass9[]={"ca\sounds\weapons\hits\hit_glass_09",0.1778279,1,50};
    	soundGlass10[]={"ca\sounds\weapons\hits\hit_glass_10",0.1778279,1,50};
    	soundIron1[]={"ca\sounds\weapons\hits\hit_iron_01",0.3162278,1,90};
    	soundIron2[]={"ca\sounds\weapons\hits\hit_iron_02",0.3162278,1,90};
    	soundIron3[]={"ca\sounds\weapons\hits\hit_iron_03",0.3162278,1,90};
    	soundIron4[]={"ca\sounds\weapons\hits\hit_iron_04",0.3162278,1,90};
    	soundIron5[]={"ca\sounds\weapons\hits\hit_iron_05",0.3162278,1,90};
    	soundIron6[]={"ca\sounds\weapons\hits\hit_iron_06",0.3162278,1,90};
    	soundIron7[]={"ca\sounds\weapons\hits\hit_iron_07",0.3162278,1,90};
    	soundIron8[]={"ca\sounds\weapons\hits\hit_iron_08",0.3162278,1,90};
    	soundIron9[]={"ca\sounds\weapons\hits\rico_hit_iron_01",0.3162278,1,90};
    	soundIron10[]={"ca\sounds\weapons\hits\rico_hit_iron_02",0.3162278,1,90};
    	soundIron11[]={"ca\sounds\weapons\hits\rico_hit_iron_03",0.3162278,1,90};
    	soundIron12[]={"ca\sounds\weapons\hits\rico_hit_iron_04",0.3162278,1,90};
    	soundGlassArmored1[]={"ca\sounds\weapons\hits\hit_glass_armored_01",0.1778279,1,60};
    	soundGlassArmored2[]={"ca\sounds\weapons\hits\hit_glass_armored_02",0.1778279,1,60};
    	soundGlassArmored3[]={"ca\sounds\weapons\hits\hit_glass_armored_03",0.1778279,1,60};
    	soundGlassArmored4[]={"ca\sounds\weapons\hits\hit_glass_armored_04",0.1778279,1,60};
    	soundGlassArmored5[]={"ca\sounds\weapons\hits\hit_glass_armored_05",0.1778279,1,60};
    	soundGlassArmored6[]={"ca\sounds\weapons\hits\hit_glass_armored_06",0.1778279,1,60};
    	soundGlassArmored7[]={"ca\sounds\weapons\hits\hit_glass_armored_07",0.1778279,1,60};
    	soundGlassArmored8[]={"ca\sounds\weapons\hits\hit_glass_armored_08",0.1778279,1,60};
    	soundVehiclePlate1[]={"ca\sounds\weapons\hits\hit_vehicle_plate_01",0.5623413,1,90};
    	soundVehiclePlate2[]={"ca\sounds\weapons\hits\hit_vehicle_plate_02",0.5623413,1,90};
    	soundVehiclePlate3[]={"ca\sounds\weapons\hits\hit_vehicle_plate_03",0.5623413,1,90};
    	soundVehiclePlate4[]={"ca\sounds\weapons\hits\hit_vehicle_plate_04",0.5623413,1,90};
    	soundVehiclePlate5[]={"ca\sounds\weapons\hits\hit_vehicle_plate_05",0.5623413,1,90};
    	soundVehiclePlate6[]={"ca\sounds\weapons\hits\hit_vehicle_plate_06",0.5623413,1,90};
    	soundVehiclePlate7[]={"ca\sounds\weapons\hits\hit_vehicle_plate_07",0.5623413,1,90};
    	soundVehiclePlate8[]={"ca\sounds\weapons\hits\hit_vehicle_plate_08",0.5623413,1,90};
    	soundVehiclePlate9[]={"ca\sounds\weapons\hits\rico_hit_vehicle_plate_01",0.5623413,1,90};
    	soundVehiclePlate10[]={"ca\sounds\weapons\hits\rico_hit_vehicle_plate_02",0.5623413,1,90};
    	soundVehiclePlate11[]={"ca\sounds\weapons\hits\rico_hit_vehicle_plate_03",0.5623413,1,90};
    	soundVehiclePlate12[]={"ca\sounds\weapons\hits\rico_hit_vehicle_plate_04",0.5623413,1,90};
    	soundWood1[]={"ca\sounds\weapons\hits\hit_wood_01",0.3162278,1,60};
    	soundWood2[]={"ca\sounds\weapons\hits\hit_wood_02",0.3162278,1,60};
    	soundWood3[]={"ca\sounds\weapons\hits\hit_wood_03",0.3162278,1,60};
    	soundWood4[]={"ca\sounds\weapons\hits\hit_wood_04",0.3162278,1,60};
    	soundWood5[]={"ca\sounds\weapons\hits\hit_wood_05",0.3162278,1,60};
    	soundWood6[]={"ca\sounds\weapons\hits\hit_wood_06",0.3162278,1,60};
    	soundWood7[]={"ca\sounds\weapons\hits\hit_wood_07",0.3162278,1,60};
    	soundWood8[]={"ca\sounds\weapons\hits\hit_wood_08",0.3162278,1,60};
    	soundWood9[]={"ca\sounds\weapons\hits\rico_hit_wood_01",0.3162278,1,60};
    	soundWood10[]={"ca\sounds\weapons\hits\rico_hit_wood_02",0.3162278,1,60};
    	soundWood11[]={"ca\sounds\weapons\hits\rico_hit_wood_03",0.3162278,1,60};
    	soundWood12[]={"ca\sounds\weapons\hits\rico_hit_wood_04",0.3162278,1,60};
    	soundHitBody1[]={"ca\sounds\weapons\hits\hit_body_01",0.01778279,1,50};
    	soundHitBody2[]={"ca\sounds\weapons\hits\hit_body_02",0.01778279,1,50};
    	soundHitBody3[]={"ca\sounds\weapons\hits\hit_body_03",0.01778279,1,50};
    	soundHitBody4[]={"ca\sounds\weapons\hits\hit_body_04",0.01778279,1,50};
    	soundHitBody5[]={"ca\sounds\weapons\hits\hit_body_05",0.01778279,1,50};
    	soundHitBody6[]={"ca\sounds\weapons\hits\hit_body_06",0.01778279,1,50};
    	soundHitBody7[]={"ca\sounds\weapons\hits\hit_body_07",0.01778279,1,50};
    	soundHitBody8[]={"ca\sounds\weapons\hits\hit_body_08",0.01778279,1,50};
    	soundHitBody9[]={"ca\sounds\weapons\hits\hit_body_09",0.01778279,1,50};
    	soundHitBody10[]={"ca\sounds\weapons\hits\hit_body_10",0.01778279,1,50};
    	soundHitBody11[]={"ca\sounds\weapons\hits\hit_body_11",0.01778279,1,50};
    	soundHitBody12[]={"ca\sounds\weapons\hits\hit_body_12",0.01778279,1,50};
    	soundHitBody13[]={"ca\sounds\weapons\hits\hit_body_13",0.01778279,1,50};
    	soundMetalPlate1[]={"ca\sounds\weapons\hits\hit_metalplate_01",0.5623413,1,90};
    	soundMetalPlate2[]={"ca\sounds\weapons\hits\hit_metalplate_02",0.5623413,1,90};
    	soundMetalPlate3[]={"ca\sounds\weapons\hits\hit_metalplate_03",0.5623413,1,90};
    	soundMetalPlate4[]={"ca\sounds\weapons\hits\hit_metalplate_04",0.5623413,1,90};
    	soundMetalPlate5[]={"ca\sounds\weapons\hits\hit_metalplate_05",0.5623413,1,90};
    	soundMetalPlate6[]={"ca\sounds\weapons\hits\hit_metalplate_06",0.5623413,1,90};
    	soundMetalPlate7[]={"ca\sounds\weapons\hits\hit_metalplate_07",0.5623413,1,90};
    	soundMetalPlate8[]={"ca\sounds\weapons\hits\hit_metalplate_08",0.5623413,1,90};
    	soundMetalPlate9[]={"ca\sounds\weapons\hits\rico_hit_metalplate_01",0.5623413,1,90};
    	soundMetalPlate10[]={"ca\sounds\weapons\hits\rico_hit_metalplate_02",0.5623413,1,90};
    	soundMetalPlate11[]={"ca\sounds\weapons\hits\rico_hit_metalplate_03",0.5623413,1,90};
    	soundMetalPlate12[]={"ca\sounds\weapons\hits\rico_hit_metalplate_04",0.5623413,1,90};
    	soundHitBuilding1[]={"ca\sounds\weapons\hits\hit_wall_01",0.2511886,1,60};
    	soundHitBuilding2[]={"ca\sounds\weapons\hits\hit_wall_02",0.2511886,1,60};
    	soundHitBuilding3[]={"ca\sounds\weapons\hits\hit_wall_03",0.2511886,1,60};
    	soundHitBuilding4[]={"ca\sounds\weapons\hits\hit_wall_04",0.2511886,1,60};
    	soundHitBuilding5[]={"ca\sounds\weapons\hits\hit_wall_05",0.2511886,1,60};
    	soundHitBuilding6[]={"ca\sounds\weapons\hits\rico_hit_wall_01",0.2511886,1,60};
    	soundHitBuilding7[]={"ca\sounds\weapons\hits\rico_hit_wall_02",0.2511886,1,60};
    	soundHitBuilding8[]={"ca\sounds\weapons\hits\rico_hit_wall_03",0.2511886,1,60};
    	soundHitBuilding9[]={"ca\sounds\weapons\hits\rico_hit_wall_04",0.2511886,1,60};
    	soundHitBuilding10[]={"ca\sounds\weapons\hits\rico_hit_wall_05",0.2511886,1,60};
    	soundHitFoliage1[]={"ca\sounds\weapons\hits\hit_grass_01",0.1778279,1,50};
    	soundHitFoliage2[]={"ca\sounds\weapons\hits\hit_grass_02",0.1778279,1,50};
    	soundHitFoliage3[]={"ca\sounds\weapons\hits\hit_grass_03",0.1778279,1,50};
    	soundHitFoliage4[]={"ca\sounds\weapons\hits\hit_grass_04",0.1778279,1,50};
    	soundPlastic1[]={"ca\sounds\weapons\hits\hit_Rubber_01",0.1778279,1,50};
    	soundPlastic2[]={"ca\sounds\weapons\hits\hit_Rubber_02",0.1778279,1,50};
    	soundConcrete1[]={"ca\sounds\weapons\hits\hit_concrete_01",0.1778279,1,70};
    	soundConcrete2[]={"ca\sounds\weapons\hits\hit_concrete_02",0.1778279,1,70};
    	soundConcrete3[]={"ca\sounds\weapons\hits\hit_concrete_03",0.1778279,1,70};
    	soundConcrete4[]={"ca\sounds\weapons\hits\hit_concrete_04",0.1778279,1,70};
    	soundConcrete5[]={"ca\sounds\weapons\hits\rico_hit_concrete_01",0.1778279,1,70};
    	soundConcrete6[]={"ca\sounds\weapons\hits\rico_hit_concrete_02",0.1778279,1,70};
    	soundConcrete7[]={"ca\sounds\weapons\hits\rico_hit_concrete_03",0.1778279,1,70};
    	soundConcrete8[]={"ca\sounds\weapons\hits\rico_hit_concrete_04",0.1778279,1,70};
    	soundRubber1[]={"ca\sounds\weapons\hits\hit_Rubber_01",0.3162278,1,50};
    	soundRubber2[]={"ca\sounds\weapons\hits\hit_Rubber_02",0.3162278,1,50};
    	soundRubber3[]={"ca\sounds\weapons\hits\hit_Rubber_03",0.3162278,1,50};
    	soundRubber4[]={"ca\sounds\weapons\hits\hit_Rubber_04",0.3162278,1,50};
    	soundRubber5[]={"ca\sounds\weapons\hits\hit_Rubber_05",0.3162278,1,50};
    	hitGroundSoft[]={"soundGroundSoft1",0.2,"soundGroundSoft2",0.2,"soundGroundSoft3",0.1,"soundGroundSoft4",0.1,"soundGroundSoft5",0.1,"soundGroundSoft6",0.1,"soundGroundSoft7",0.1,"soundGroundSoft8",0.1};
    	hitGroundHard[]={"soundGroundHard1",0.2,"soundGroundHard2",0.2,"soundGroundHard3",0.1,"soundGroundHard4",0.1,"soundGroundHard5",0.1,"soundGroundHard6",0.1,"soundGroundHard7",0.1,"soundGroundHard8",0.1};
    	hitMan[]={"soundHitBody1",0.077,"soundHitBody2",0.077,"soundHitBody3",0.077,"soundHitBody4",0.077,"soundHitBody5",0.077,"soundHitBody6",0.077,"soundHitBody7",0.077,"soundHitBody8",0.077,"soundHitBody9",0.077,"soundHitBody10",0.077,"soundHitBody11",0.077,"soundHitBody12",0.077,"soundHitBody13",0.077};
    	hitArmor[]={"soundVehiclePlate1",0.1,"soundVehiclePlate2",0.1,"soundVehiclePlate3",0.05,"soundVehiclePlate4",0.05,"soundVehiclePlate5",0.1,"soundVehiclePlate6",0.05,"soundVehiclePlate7",0.1,"soundVehiclePlate8",0.1,"soundVehiclePlate9",0.05,"soundVehiclePlate10",0.1,"soundVehiclePlate11",0.1,"soundVehiclePlate12",0.1};
    	hitIron[]={"soundIron1",0.1,"soundIron2",0.1,"soundIron3",0.1,"soundIron4",0.1,"soundIron5",0.1,"soundIron6",0.1,"soundIron7",0.05,"soundIron8",0.05,"soundIron9",0.1,"soundIron10",0.1,"soundIron11",0.05,"soundIron12",0.05};
    	hitBuilding[]={"soundHitBuilding1",0.1,"soundHitBuilding2",0.1,"soundHitBuilding3",0.1,"soundHitBuilding4",0.1,"soundHitBuilding5",0.1,"soundHitBuilding6",0.1,"soundHitBuilding7",0.1,"soundHitBuilding8",0.1,"soundHitBuilding9",0.1,"soundHitBuilding10",0.1};
    	hitFoliage[]={"soundHitFoliage1",0.25,"soundHitFoliage2",0.25,"soundHitFoliage3",0.25,"soundHitFoliage4",0.25};
    	hitWood[]={"soundWood1",0.1,"soundWood2",0.1,"soundWood3",0.1,"soundWood4",0.05,"soundWood5",0.05,"soundWood6",0.1,"soundWood7",0.1,"soundWood8",0.1,"soundWood9",0.1,"soundWood10",0.1,"soundWood11",0.05,"soundWood12",0.05};
    	hitGlass[]={"soundGlass1",0.1,"soundGlass2",0.1,"soundGlass3",0.1,"soundGlass4",0.1,"soundGlass5",0.1,"soundGlass6",0.1,"soundGlass7",0.1,"soundGlass8",0.1,"soundGlass9",0.1,"soundGlass10",0.1};
    	hitGlassArmored[]={"soundGlassArmored1",0.125,"soundGlassArmored2",0.125,"soundGlassArmored3",0.125,"soundGlassArmored4",0.125,"soundGlassArmored5",0.125,"soundGlassArmored6",0.125,"soundGlassArmored7",0.125,"soundGlassArmored8",0.125};
    	hitConcrete[]={"soundConcrete1",0.2,"soundConcrete2",0.2,"soundConcrete3",0.2,"soundConcrete4",0.05,"soundConcrete5",0.05,"soundConcrete6",0.1,"soundConcrete7",0.1,"soundConcrete8",0.1};
    	hitRubber[]={"soundRubber1",0.2,"soundRubber2",0.2,"soundRubber3",0.2,"soundRubber4",0.2,"soundRubber5",0.2};
    	hitPlastic[]={"soundPlastic1",0.5,"soundPlastic2",0.5};
    	hitDefault[]={"soundDefault1",0.2,"soundDefault2",0.2,"soundDefault3",0.1,"soundDefault4",0.1,"soundDefault5",0.1,"soundDefault6",0.1,"soundDefault7",0.1,"soundDefault8",0.1};
    	hitMetal[]={"soundMetal1",0.1,"soundMetal2",0.1,"soundMetal3",0.1,"soundMetal4",0.05,"soundMetal5",0.1,"soundMetal6",0.1,"soundMetal7",0.05,"soundMetal8",0.1,"soundMetal9",0.05,"soundMetal10",0.05,"soundMetal11",0.1,"soundMetal12",0.1};
    	hitMetalplate[]={"soundMetalPlate1",0.1,"soundMetalPlate2",0.1,"soundMetalPlate3",0.1,"soundMetalPlate4",0.05,"soundMetalPlate5",0.05,"soundMetalPlate6",0.05,"soundMetalPlate7",0.1,"soundMetalPlate8",0.1,"soundMetalPlate9",0.1,"soundMetalPlate10",0.1,"soundMetalPlate11",0.1,"soundMetalPlate12",0.05};
    	bulletFly1[]={"ca\sounds\weapons\hits\bullet_by1",1,1,50};
    	bulletFly2[]={"ca\sounds\weapons\hits\bullet_by2",1,1,50};
    	bulletFly3[]={"ca\sounds\weapons\hits\bullet_by3",1,1,50};
    	bulletFly4[]={"ca\sounds\weapons\hits\bullet_by4",1,1,50};
    	bulletFly5[]={"ca\sounds\weapons\hits\bullet_by5",1,1,50};
    	bulletFly6[]={"ca\sounds\weapons\hits\bullet_by6",1,1,50};
    	bulletFly[]={"bulletFly1",0.166,"bulletFly2",0.166,"bulletFly3",0.166,"bulletFly4",0.166,"bulletFly5",0.166,"bulletFly6",0.167};
    	supersonicCrackNear[]={"Ca\sounds\Weapons\explosions\supersonic_crack_close",1,1,150};
    	supersonicCrackFar[]={"Ca\sounds\Weapons\explosions\supersonic_crack_50meters",1,1,250};
    
    };
    
    };

    The problem is that ingame when I equipt the smart ammo the weapon go's the the back of the soldier and he's just grabbin emty air.

    Antother problem is that when I fire the weapon with smart ammo I do hear a sound but see no impact.

    any ideas ?


  4. Gia could you explain how to use this command, I looket it up via func help ingame but got a bit confused how to use it and what it returns.

    EDIT :

    could it be somthing like this ??

    the positions are obtained via GetPosASL.

       _finalHeading = [_AGMplatformpos,_Playerpos] call BIS_fnc_vectorFromXToY;
       _AGMplatform setVectorUp [_finalHeading];
    


  5. Hello all.

    I'm trying to make an object (floating in the air) to point at somthing thats on the ground.

    The problem is I can only get it to point in the compas direction with the bis fuction BIS_fnc_DirTo.

    And not to get it pointing downwards toward it.

    Just so you know I cannot use the dowatch or dotarget or lookat commands because I wan't the object to point at it and not just a turred or unit to look at it.

    Help...


  6. 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).


  7. 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 ?


  8. 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,


  9. okay the skript got a overhaul :)

    First name the initial player controllerplayer.

    You gotta place a emty hmmwv named controller with this:

    this addaction ["remote control", "remotecontrol.sqf",nil, 6, false, false, "", "player in controller"]; this lockCargo lock

    in its ini.

    Then you have to place a occupied vehicle with a gunner named controlled with this

    this addaction ["end remote control", "endremotecontrol.sqf",nil, 6, false, false, "", "player in controlled"];

    in its ini.

    remotecontrol.sfq

    _controller = controller;
    _controlled = controlled;
    if (alive _controlled) then
    {
       if (!isNull driver _controller) then {selectPlayer gunner _controlled;
       driver _controller remoteControl gunner _controlled;
       gunner _controlled switchCamera "GUNNER";};
       if (!isNull commander _controller) then {selectPlayer gunner _controlled;
       commander _controller remoteControl gunner _controlled;
       gunner _controlled switchCamera "GUNNER";};
       if (!isNull gunner _controller) then {selectPlayer gunner _controlled;
       gunner _controller remoteControl gunner _controlled;
       gunner _controlled switchCamera "GUNNER";};
    };

    endremotecontrol.sfq

    _controlled = controlled;
    _controller = controller;
    if (alive _controlled) then
    {
       selectPlayer controllerplayer;
       gunner _controlled remoteControl player;
       player switchCamera "INTERNAL";
    };

    This works pritty well exept for one thing !

    The camera does not properly go back to the player and does not proberly control the gunner.


  10. ey all

    I have been working on a skript to remote control a gunner of a AH-1Z.

    this is named remotecontroll.sqf

    name the controller (the player) controller and the controlled controlled... (can't be more strait forward :))

    _id = _this select 2;
    _controller= controller;
    _controlled = gunner controlled;
    if (alive _controller and alive _controlled) then
    {
       _controller removeaction _id;
       _controller remoteControl _controlled;
       _controlled switchCamera "gunner";
       _controlled addaction ["end emote control", "endremotecontrol.sqf",nil, 6, false, false];
    };

    this is the end remote control skript :

    _id = _this select 2;
    _controlled = gunner controlled;
    _controller = controller;
    if (alive _controller and alive _controlled) then
    {
       _controlled removeaction _id;
       objnull remoteControl _controlled;
       _controller switchCamera "internal";
       _controller addaction ["remote control", "remotecontrol.sqf",nil, 6, false, false];
    };

    two thing go wrong :

    frist the switch camera command isn't working correctly, it does not go to the gunner sight. but to a incontrolleble 1st person.

    I can controll the gun and shoot it tought.

    seccond it does not add the action to the controlled unit..

    if anybody could help me ?? :)


  11. lol your making it way to complicated...

    afther finetuning it a bit i got this woking :).

    in player ini

    this addWeapon "LaserDesignator"; this addMagazine "LaserBatteries"; this addAction ["Call_firemission","arty.sqf"]

    in arty.sqf

    _id = _this select 2;
    if (alive player) then
    {
       player removeAction _id;
       hint "Shells on the way";
       heTemplate = ["IMMEDIATE", "HE", 0, 48];
       target1 = getposASL lasertarget player;  
       firemission=0;
       [RIPPER, target1, heTemplate] call BIS_ARTY_F_ExecuteTemplateMission;
       sleep 5;
       hint "Battery reloading";
       sleep 25;
       hint "Battery ready";
       player addAction ["Call_firemission","arty.sqf"]
    };

    ty for the hq chat codes btw i'll add that.

    with the hq chat codes it looks like this

    _id = _this select 2;
    heTemplate = ["IMMEDIATE", "HE", 0, 48];
    _unit = player;
    
    if (alive player) then
    {
       _unit removeAction _id;
       target1 = getposASL lasertarget _unit;
    
       if (isNull lasertarget _unit) exitWith {hint "No laser target found!"};
       [RIPPER, "HE"] call BIS_ARTY_F_LoadMapRanges;
    
       _min = RIPPER getVariable "ARTY_MIN_RANGE";
       _max = RIPPER getVariable "ARTY_MAX_RANGE";
       _range = RIPPER distance target1;
       if (_range > _max || _range < _min) exitWith {_unit commandChat format["Artillery reports target not in range. p %1, m %2, x %3",_range, _min, _max]};
    
       [RIPPER, target1, heTemplate] call BIS_ARTY_F_ExecuteTemplateMission;
       waitUntil {RIPPER getVariable "ARTY_ONMISSION"};
       _unit commandChat "Battery has solution";
       waitUntil {RIPPER getVariable "ARTY_SHOTCALLED"};
       _unit commandChat "Battery opening fire";
       [RIPPER, _unit] spawn {
           _b = _this select 0;
           _u = _this select 1;
           waitUntil {_b getVariable "ARTY_SPLASH"};
           _u commandChat "Splash";
       };
       waitUntil {RIPPER getVariable "ARTY_COMPLETE"};
       _unit commandChat "All rounds completed";
       sleep 5;
       _unit commandchat "Battery reloading";
       waitUntil {[RIPPER, heTemplate] call BIS_ARTY_F_Available};
       _unit commandChat "Battery ready";
       _unit addAction ["Call_firemission","arty.sqf"]
    
    };


  12. The bis_arty_f_ thing workes just fine for me in other singleplayer missions.

    And for the rang as far as i know yes, i'm using real arty (no virtual) with arty ammo in CO.

    ..

    Gonna try with virtuals.

    No luck with virtuals

    Btw is there a way to test if you arty is out of reange ??

    ---------- Post added at 10:26 PM ---------- Previous post was at 09:08 PM ----------

    okay got it working, was indeed a range problem ty :)


  13. hello all

    I'm trying to make a mission in which you must laze somthing (could also be ground so no target), call a strike and arty will come down on it.

    I have the player with :

    this addAction ["Call firemission","arty.sqf"]

    And the sqf file with :

    firemission = 1;
    reloaded = 0;
    while {firemission>0} do
    {
       hint "Shells on the way";
       heTemplate = ["IMMEDIATE", "HE", 0, 24];    
       target = getposASL lasertarget;     
       [battery1, target, heTemplate] call BIS_ARTY_F_ExecuteTemplateMission;    
       firemission=0;
       sleep 5;
       hint "Battery reloading"
       sleep 25;
       reloaded = 1;
       hint "Battery ready";
    };

    What am i doing wrong ??

    please keep it simple :)


  14. I wrote a smal script for one of my missions

    AT2 = ["IMMEDIATE", "LASER", 0, 1]; Target1 = getPos player nearObjects ["laserTargetW",1000]; _marker = createMarker ["Marker2", position Target1 ]; LT1 = getMarkerPos Marker2; [LRIPPER, LT1, AT2] call BIS_ARTY_F_ExecuteTemplateMission;

    its intended to fire 1 laser guided round upon the location of the laser pointer.

    But IT DOENS'S WORk.

    I seached for over 3 days now.

    somboyd please help.


  15. Hi all.. have been searching the forums for days now.. havent found what i,m looking fore.. :butbut:

    I wanna make a mission in the 3D editor with construction Interface.

    I have managed to get the game logic contruction interface into the editor onto the map but cant seem te sync it to the player like in 2D editor :confused:

    Any ini commands like

    player synchronizeObjectsAdd [constuction] 

    With constuction the name of the constuction interface

    Dont seem to work either :confused:

    could someone please help me... :pray:


  16. that addon + flir scrip would make it alhole.

    at the mean time Feint as offered me to make a skin for the orgional plane

    so my guns fit in nicely.

    The only think i need now are a static 5 barrel gatting weapon and a boffors L60 model.

    does anyone now anybody who has this ??

    or are thre already addons released withe this contens ??

    about the rate of fire, it is as in the real world around 3900 shots a minut.

    ---------- Post added at 08:06 AM ---------- Previous post was at 08:05 AM ----------

    a nother version has been released the guns now have a continues sound so you won't hear one shot everitime you fire a burst.

    you can find it at armaholic


  17. About that detection I BROKE MY HEAD OPEN SEVERAL TIMES.

    Tryed the deferend reveal commands for weeks DIT NOT WORK.

    I tryed radar but that doesn't work either because it only sees vicheles

    If anybody has an edea about HOW TO DETECT INFATRY FROM 700 M HIGHT AT GUNNER POSITION.

    Pleas tell mee.

    as for the 2d editor I,M WOKING ON IT NOW.

    it will be fixed soos.

×