Jump to content
beako

Getting UAV to fire AT weapon instead of cluster munition

Recommended Posts

HI ALl,

 

I have a script for a UAV (Sentinel) that targets enemy units (tanks and soldiers)...

 

The problem is, as part of the script their is a JTAC soldier that uses laserTarget to target the same object as the UAV.

 

The UAV is armed with PylonMissile_1Rnd_BombCluster_01_F and PylonMissile_Missile_AGM_02_x2, but I only want the UAV to fire the AT munition (PylonMissile_Missile_AGM_02_x2) on the tank, but because the laserTarget is on the tank from the JTAC, it fires the bombcluster munition instead.

 

How should I script for the UAV to use weapon_AGM_65Launcher on Tanks only?

 

I've tried the following with [0] and [-1] as a turretPath for selectWeaponTurret, but has no effect...I even tried using selectWeapon with no luck.

 

I want to avoid forceFire, since it misses the target.

 

// laserTarget from JTAC soldier
	_laserTarget = laserTarget _JTACUnit; 


// AT Ammo Count 
	_getPylMagArray = getPylonMagazines _airTransport; 	
	_ammoCountATArray = [0,0];	
	for "_i" from 1 to 2 do {
		if (((_getPylMagArray select (_i - 1)) find "PylonMissile_Missile_AGM_02_x2") > -1) then {
			_ammoCountATArray set [(_i - 1), (_airTransport ammoOnPylon ("pylon" + str _i))];
		} else {
			_ammoCountATArray set [(_i - 1), 0];
		};
	};
	_ammoCountAT = 0;	
	{_ammoCountAT = _ammoCountAT + _x} forEach _ammoCountATArray;	

// do not user clusterbomb on tanks
	if !(isNull _laserTarget) then  {
		if (_ammoCountAT > 0) then {
			_sentinelUAV selectWeaponTurret ["weapon_AGM_65Launcher", []];	//"BombCluster_01_F"
			_sentinelUAV selectWeapon "weapon_AGM_65Launcher";
		};
	};

 

Share this post


Link to post
Share on other sites
15 hours ago, beako said:

HI ALl,

 

I have a script for a UAV (Sentinel) that targets enemy units (tanks and soldiers)...

 

The problem is, as part of the script their is a JTAC soldier that uses laserTarget to target the same object as the UAV.

 

The UAV is armed with PylonMissile_1Rnd_BombCluster_01_F and PylonMissile_Missile_AGM_02_x2, but I only want the UAV to fire the AT munition (PylonMissile_Missile_AGM_02_x2) on the tank, but because the laserTarget is on the tank from the JTAC, it fires the bombcluster munition instead.

 

How should I script for the UAV to use weapon_AGM_65Launcher on Tanks only?

 

I've tried the following with [0] and [-1] as a turretPath for selectWeaponTurret, but has no effect...I even tried using selectWeapon with no luck.

 

I want to avoid forceFire, since it misses the target.

 


// laserTarget from JTAC soldier
	_laserTarget = laserTarget _JTACUnit; 


// AT Ammo Count 
	_getPylMagArray = getPylonMagazines _airTransport; 	
	_ammoCountATArray = [0,0];	
	for "_i" from 1 to 2 do {
		if (((_getPylMagArray select (_i - 1)) find "PylonMissile_Missile_AGM_02_x2") > -1) then {
			_ammoCountATArray set [(_i - 1), (_airTransport ammoOnPylon ("pylon" + str _i))];
		} else {
			_ammoCountATArray set [(_i - 1), 0];
		};
	};
	_ammoCountAT = 0;	
	{_ammoCountAT = _ammoCountAT + _x} forEach _ammoCountATArray;	

// do not user clusterbomb on tanks
	if !(isNull _laserTarget) then  {
		if (_ammoCountAT > 0) then {
			_sentinelUAV selectWeaponTurret ["weapon_AGM_65Launcher", []];	//"BombCluster_01_F"
			_sentinelUAV selectWeapon "weapon_AGM_65Launcher";
		};
	};

 

firstly "weapon_AGM_65Launcher" are infrared-guided hence will not lock onto laser nor guide toward target. scalpel, dagr are the only vanilla laser guided missiles. possibly doTarget _laserTarget object

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

×