Guided missile (yes, TOW) config for helicopter?

ArmA editing, missions, modeling, textures, terrains

Moderators: Snake Man, Lone Wolf

Post Reply
Snake Man
Commander-In-Chief
Posts: 8603
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Guided missile (yes, TOW) config for helicopter?

Post by Snake Man » 2009-03-23 12:17:36

In BIS vehicles there is the HMMWV which has vehicle mounted TOW launcher, where gunner guides the missile into target optically (with gunsights), there is also same as static vehicle.

However I'm now trying to look how to implement this on aircraft vehicle (helicopter), by almost copy pasting the TOW launcher code from BIS config, I cant get the missile to guide, it just fires dead ahead. Although there is one strange thing, I cant guide the 3rd person gunner view, I have to be in the gunsights (V) view to steer the aim point, perhaps this is the problem?

Any ideas why the 3rd person viewpoint is locked dead ahead?

Here are the related config parts.

cfgWeapons:

Code: Select all

	class VTE_ah1towlauncher: MissileLauncher
	{
		scope = public;
		displayName = $STR_VTE_DISPLAYNAME_TOW;
		sound[] = {"\ca\Weapons\Data\Sound\Javelin1", 15, 1};
		soundFly = {"\ca\Weapons\Data\Sound\rocket_fly1", 10, 0.8};
		reloadTime = 1;
		magazineReloadTime = 30;
		canLock = true;
		minRange = 10;
		minRangeProbab = 0.10;
		midRange = 1400;
		midRangeProbab = 0.7;
		maxRange = 4000;
		maxRangeProbab = 0.001;
		aiRateOfFire = 5;
		aiRateOfFireDistance = 500;
		magazines[] = {"VTE_4Rnd_TOW"};
	};
cfgMagazines:

Code: Select all

	class VTE_4Rnd_TOW: VTE_VehicleMagazine
	{
		ammo = "VTE_TOW_Missile";
		count = 4;
	};
cfgAmmo:

Code: Select all

	class VTE_TOW_Missile : VTE_BaseMissile
	{
		hit = 650;
		indirectHit = 20;
		indirectHitRange = 2;
		model = "\vte_wpn\models\veh\vte_tow_missile.p3d";
		cost = 8000;
		maxSpeed = 360;
		irLock = true;
		manualControl = true;
		maxControlRange = 8000;
		trackOversteer = 1;
		trackLead = 1;
		initTime = 0;
		thrustTime = 2.5;
		thrust = 350;
		maneuvrability = 5;
	};
The VTE_VehicleMagazine and VTE_BaseMissile inheritance is nothing spectacular, I'd be amazed if some value from there would cause a problem.

However just in case, here they are.
VTE_BaseMissile:

Code: Select all

	class VTE_BaseMissile : MissileCore
	{
		manualControl = false;
		maneuvrability = 20;
		maxSpeed = 500;
		simulationStep = 0.01;
		sideAirFriction = 0.2;
		maxControlRange = 4000;
		soundHit[] = {"\vte_sounds\weapons\shellimpact3.wss", 45, 1};
		soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1", 0.1, 1.5};
		soundEngine[] = {"\ca\Weapons\Data\Sound\noise", 0.00316228, 1};
		CraterEffects = "MissileCrater";
		explosionEffects = "ExplosionEffects";
	};
VTE_VehicleMagazine:

Code: Select all

	class VTE_VehicleMagazine: CA_Magazine
	{
		type = VSoft;
		reloadAction = "";
	};
Anyone got a solution?
PMC since 1984

Editing knowledge, visit PMC Editing Wiki
Addon manuals, visit PMC addons/mods online manuals
View our videos in PMC Youtube channel.

PMC Tactical forum Advanced Search is power.

User avatar
Vigilante
Recruit
Posts: 33
Joined: 2008-12-03 11:41:58
Gaming Interests: Armed Assault (ArmA)
Editing Interests: All, I (try) to edit everything.
Contact:

Re: Guided missile (yes, TOW) config for helicopter?

Post by Vigilante » 2009-03-23 23:08:42

Did you try to inherit directly from BIS TOW class, instead of creating your own baseclass first?
You still can change values by overwriting in your own new class...

I also guess the BIS TOW creates a invisibleTarget/Lasertarget at your gunsight (Like the Laserdesignator) which the missile tries to 'get'. tracklead should be = 0 .. or? tracklead means the missile tries to 'predict' the targets path in the next future, maybe without it helps.
I also remember the BIS missiles when locked always try to hit a invisible target some 1600m in front of firing position or so... so anything closer and further away than a certain threshold aint really hitable... i just dont remember exactly what the distance was and where i read it... somewhere on BISforums.

But i would rather do a scripted solution, getting your weapon/view vector and just dumbly steering the missile with a simple spawn loop into that direction...
a.k.a. PhilippRauch
Check out my Addons Wiki @ http://vigilante-systems.webs.com (WIP but already contains lots of infos)

Snake Man
Commander-In-Chief
Posts: 8603
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Re: Guided missile (yes, TOW) config for helicopter?

Post by Snake Man » 2009-03-24 06:29:33

Good point about the BIS baseclass, I'll try that today.

I would want to keep away of any scripting solution, VTE is built to be 100% compatible, stutter free and MP friendly, if we can avoid scripts, great.
PMC since 1984

Editing knowledge, visit PMC Editing Wiki
Addon manuals, visit PMC addons/mods online manuals
View our videos in PMC Youtube channel.

PMC Tactical forum Advanced Search is power.

User avatar
Vigilante
Recruit
Posts: 33
Joined: 2008-12-03 11:41:58
Gaming Interests: Armed Assault (ArmA)
Editing Interests: All, I (try) to edit everything.
Contact:

Re: Guided missile (yes, TOW) config for helicopter?

Post by Vigilante » 2009-03-24 13:16:01

about 3rd person being, locked... at first i didnt understand... but why the hell you want to guide your tow from 3rd person??
I think its disabled by default, or its somewhere in your difficulty settings of veteran/recruit and maybe your TOW isnt really a guided class..
a.k.a. PhilippRauch
Check out my Addons Wiki @ http://vigilante-systems.webs.com (WIP but already contains lots of infos)

Snake Man
Commander-In-Chief
Posts: 8603
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Re: Guided missile (yes, TOW) config for helicopter?

Post by Snake Man » 2009-03-24 13:52:20

I don't necessarily want to guide TOW from 3rd person view, it was just an example / additional information to figure out my TOW problem.

For example when you are in gunner view but NOT in the gunsights (V) view, you can rotate your view when using cannon and hellfires, but when you choose FFAR's then the view locks into 0 degrees dead ahead. That might be the problem that the TOW is working fine, its just that the view is locked "internally" dead ahead along the axis of aircraft. No idea really.
PMC since 1984

Editing knowledge, visit PMC Editing Wiki
Addon manuals, visit PMC addons/mods online manuals
View our videos in PMC Youtube channel.

PMC Tactical forum Advanced Search is power.

User avatar
Vigilante
Recruit
Posts: 33
Joined: 2008-12-03 11:41:58
Gaming Interests: Armed Assault (ArmA)
Editing Interests: All, I (try) to edit everything.
Contact:

Re: Guided missile (yes, TOW) config for helicopter?

Post by Vigilante » 2009-03-24 15:29:11

sounds if the TOW (or gunner weapon) have/has some rockets stuff inherited... can you switch them to hellfire? also simulation = "something" is quite often a culprit. overwrite with "maverickWeapon", "shotMissile" or so... depends on where the trouble is. ammo could be a problem...

I mean it sounds like, when you switch to gun/hellfire everything is fine, but when you switch the weapon to TOW its like when switching to FFAR? Did i understand correctly? If so it sounds like the turret or gunnerposition or weapon has some FFAR connection, which is obviously not what you want.

EDIT: (i think this is the trouble)
Try simulation=shotMissile inside CfgAmmo for your baseClass and if not working try to inherit from Hellfire instead of MissileCore... if you look into CA then you will see all Base/Core classes contain VERY little config stuff... and your posted example doesnt contains that much more either, so try this...

Code: Select all

   class VTE_BaseMissile : MissileCore
   {
      manualControl = false;
      maneuvrability = 20;
      maxSpeed = 500;
      simulation =  "shotMissile";
     simulationStep = 0.01;
      sideAirFriction = 0.2;
      maxControlRange = 4000;
      soundHit[] = {"\vte_sounds\weapons\shellimpact3.wss", 45, 1};
      soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1", 0.1, 1.5};
      soundEngine[] = {"\ca\Weapons\Data\Sound\noise", 0.00316228, 1};
      CraterEffects = "MissileCrater";
      explosionEffects = "ExplosionEffects";
   };
---------


EDIT2:
Ok, i searched the CA and other ArmA places for TOW stuff, this is how they did it for the HMMWV and stryker
This is ArmA TOW Ammo:

Code: Select all

	class M_TOW_AT : MissileBase {
		model = "\ca\weapons\tow";
		hit = 650;
		indirectHit = 20;
		indirectHitRange = 2;
		cost = 8000;
		maxSpeed = 360;
		irLock = true;
		manualControl = true;
		maxControlRange = 8000;
		trackOversteer = 1;
		trackLead = 1;
		initTime = 0;
		thrustTime = 2.5;
		thrust = 350;
		maneuvrability = 20.0;
	};
from ArmA CfgNonAIVehicles

Code: Select all

	class ProxyHMMWVTOWLauncher : ProxyWeapon {
		model = "\ca\Weapons\TOWnew";
		simulation = "maverickweapon";
	};
	
ArmA CfgMagazines

Code: Select all

	class 6Rnd_TOW_HMMWV : VehicleMagazine {
		scope = public;
		displayName = $STR_DN_TOW;
		ammo = M_TOW_AT;
		initSpeed = 8;
		count = 6;
		maxLeadSpeed = 10;
	};

	class 2Rnd_TOW : 6Rnd_TOW_HMMWV {
		count = 2;
	};
	
ArmA CfgWeapons

Code: Select all

	class TOWLauncher : MissileLauncher {
		displayName = $STR_DN_TOW;
		minRange = 10;
		minRangeProbab = 0.1;
		midRange = 1400;
		midRangeProbab = 0.7;
		maxRange = 4000;
		maxRangeProbab = 0.001;
		sound[] = {"\ca\Weapons\Data\Sound\Javelin1", 31.6228, 1};
		soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1", 25.1189, 0.8};
		reloadTime = 1;
		canLock = LockCadet;
		magazineReloadTime = 30;
		magazines[] = {"2Rnd_TOW"};
		aiRateOfFire = 5.0;
		aiRateOfFireDistance = 500;
	};

	class TOWLauncherSingle : TOWLauncher {
		reloadTime = 8;
		magazines[] = {"6Rnd_TOW_HMMWV"};
	};

for the last two the interesting would be weapons[] inside turrets , i think


CfgVehicles

Code: Select all

	class HMMWVTOW : HMMWV50 {
		displayName = $STR_DN_HMMWVTOW;
		model = "\ca\Wheeled\HMMWVTOW";
		picture = "\Ca\wheeled\data\ico\HMMWVTOW_CA.paa";
		Icon = "\Ca\wheeled\data\map_ico\icomap_hmwvTOW_CA.paa";
		mapSize = 8;
		transportAmmo = 0;
		gunnerHasFlares = true;
		cost = 150000;
		commanderCanSee = 31;
		gunnerCanSee = 31;
		
		class Turrets : Turrets {
			class MainTurret : MainTurret {
				minElev = -10;
				maxElev = 20;
				weapons[] = {"TOWLauncherSingle"};
				magazines[] = {"6Rnd_TOW_HMMWV"};
				soundServo[] = {"\ca\wheeled\Data\Sound\servo3", db-75, 1.0};
				gunnerAction = "HMMWV_Gunner03";
				gunnerOpticsModel = "\ca\weapons\optika_TOW";
				castGunnerShadow = true;
				
				class ViewOptics {
					initAngleX = 0;
					minAngleX = -30;
					maxAngleX = 30;
					initAngleY = 0;
					minAngleY = -100;
					maxAngleY = 100;
					initFov = 0.42;
					minFov = 0.22;
					maxFov = 0.64;
				};
			};
		};
		dammageHalf[] = {"\ca\wheeled\data\HMMWV_glass_CA.paa", "\ca\wheeled\data\HMMWV_glassbr1_CA.paa", "\ca\wheeled\data\HMMWV_glass_CA.paa", "\ca\wheeled\data\HMMWV_glassbr1_CA.paa"};
		dammageFull[] = {"\ca\wheeled\data\HMMWV_glass_CA.paa", "\ca\wheeled\data\HMMWV_glassbr2_CA.paa", "\ca\wheeled\data\HMMWV_glass_CA.paa", "\ca\wheeled\data\HMMWV_glassbr2_CA.paa"};
		
		class Damage {
			tex[] = {};
			mat[] = {"ca\wheeled\data\hmmwv_regular_1.rvmat", "ca\wheeled\data\hmmwv_regular_1.rvmat", "ca\wheeled\data\hmmwv_regular_1_destruct.rvmat", "ca\wheeled\data\hmmwv_hood.rvmat", "ca\wheeled\data\hmmwv_hood.rvmat", "ca\wheeled\data\hmmwv_hood_destruct.rvmat", "ca\wheeled\data\hmmwv_details.rvmat", "ca\wheeled\data\hmmwv_details.rvmat", "ca\wheeled\data\hmmwv_details_destruct.rvmat", "ca\wheeled\data\hmmwv_body.rvmat", "ca\wheeled\data\hmmwv_body.rvmat", "ca\wheeled\data\hmmwv_body_destruct.rvmat", "ca\weapons\data\tow.rvmat", "ca\weapons\data\tow.rvmat", "ca\weapons\data\tow_destruct.rvmat", "ca\wheeled\data\hmmwv_clocks.rvmat", "ca\wheeled\data\hmmwv_clocks.rvmat", "ca\wheeled\data\hmmwv_clocks_destruct.rvmat"};
		};
		threat[] = {0.9, 0.7, 0.3};
	};

for the TOW stryker its like (removed other stuff, just the turrets:

Code: Select all

	class Turrets : Turrets {
			class MainTurret : MainTurret {
				weapons[] = {"TOWLauncher"};
				magazines[] = {"2Rnd_TOW", "2Rnd_TOW", "2Rnd_TOW", "2Rnd_TOW", "2Rnd_TOW"};
				gunnerOpticsModel = "\ca\weapons\optika_TOW";
			};
		};
a.k.a. PhilippRauch
Check out my Addons Wiki @ http://vigilante-systems.webs.com (WIP but already contains lots of infos)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests