Jump to content
Sign in to follow this  
interectic

AI Blackfish fire at player laser

Recommended Posts

Hey everyone,

just trying to get the AI in the Blackfish to at the vehicle or enemy group I am lasing and I can't find any real successful scripts to do that. I have tried using laserTarget but it doesn't seem to work all the time. Id appreciate some advice.

Thanks

Share this post


Link to post
Share on other sites

	private _target = laserTarget player;
	private _heli = missionNamespace getVariable ['helicopter_2',objNull];
	private _group = (group (driver _heli));
	{
		if !(_x isEqualTo (driver _heli)) then {
			_x doWatch objNull;

			// this will cause the heli to move in a straight line and stop it from following waypoints
			_x doSuppressiveFire _target;
		};
	} forEach ((units _group));

	// The bottom part is if you wanna make them go back to normal flight
	// return everyone to formation
	(units (driver _heli)) doFollow (leader (driver _heli));

Something like this ^^

That's from a script that spawns in helicopter and lets the player control it via addactions
(move, pickup, drop off, engage lazer)
https://pastebin.com/1DN7FQu4

I don't have arma installed, so I can't test it, but it should work, or at least a place to start!

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  

×