Jump to content
Sign in to follow this  
_SCAR

Jets CAS to attack infantry

Recommended Posts

Hello,

I can't seem to find a way to make my OPFOR jets attack BLUFOR infantry. I use this:

 

{
	if (side _x == west) then {
		_laserT = createVehicle ["LaserTargetE", [0,0,0], [], 0, "NONE"];
		_laserT attachto [_x, [0, 0, 0]];
		
		_cleanUp = [_x, _laserT] spawn {
			waituntil {!alive (_this select 0)};
			deletevehicle (_this select 1);
			
			true
		};
	};
} forEach allUnits;

 

To no avail.

 

Any ideas?

 

Thank you,

_SCAR

Share this post


Link to post
Share on other sites
  1. Add a sleep to the cleanup or use an event handler
    Spoiler

    Maybe something like this (not tested):

    
    {
    	if (side _x == west) then {
    		_laserT = createVehicle ["LaserTargetE", [0,0,0], [], 0, "NONE"];
    		_laserT attachto [_x, [0, 0, 0]];
    		
    		call compile format ["
    			_x addEventHandler ['killed', {
    				deletevehicle %1;
    			}];
    		", _laserT];
    	};
    } forEach allUnits;

     

     

  2. Reveal the infantry to the jets.

Share this post


Link to post
Share on other sites

A sleep is really not needed, that's what waitUntil is for.

 

I should have mentioned that I've already tried reveal, doTarget and doFire to no avail too.

Share this post


Link to post
Share on other sites

Its partly because the infantry are so small they are difficult to detect.

 

I have tested this problem and you can too.  There is a trigger activation:  Detected by Opforce

 

If the trigger never activates it means they cannot detect the troops.

 

To force the attack you need to name the aircraft and name each soldier and instruct the jet to attack the soldiers

 

 

 

 

 

Share this post


Link to post
Share on other sites

The OP is using a spawned laser designator target and it does not matter if the plane knowsabout the soldiers to which is attached to.

 

Question: Have you tried to reveal the laser target?

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, barbolani said:

The OP is using a spawned laser designator target and it does not matter if the plane knowsabout the soldiers to which is attached to.

 

Question: Have you tried to reveal the laser target?

 

No I have not. I will try and report back. At this point I'm just trying to instruct the Jets to target a specific position, as it would happen in real scenarios with a spotter telling them to hit specific coords. 

Share this post


Link to post
Share on other sites

This did it. Thank you barbolani!

  • Like 1

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  

×