Jump to content
mattyfo

How to make AI QRF/Hunter killer team?

Recommended Posts

I'm sure there are millions of topics on this, I've found most of them but am still stumped.

 

  So I basically want an enemy AI team to move to my location when I get spotted in a stealth mission and search the area since I will either leave or hide.  I named said ai group "qrf" and in a bluefor detected by ind trigger I have a "grf move getpos player; qrf setcombatmode red" it works well enough to get the ai to my last known position but when they get there they don't do anything.  They just sit in the truck.  How can I get them to disembark and search an area? Or instead of a move waypoint can I do a search and destroy waypoint in my initial trigger? It obviously is not called searchanddestroy because that just gave me an error.

 

Can I maybe spawn a trigger on my last know loc when the initial trigger activates so when qrf gets there it will activate another wp?

 

Looking for simple things with triggers not scripts as I just play out of the editor.

 

Any help is appreciated as I spent 2 hours trying things out and I have to sleep now!

Share this post


Link to post
Share on other sites

Maybe try and use a loiter waypoint once they reach your position. If you want the loiter radius to be specific you can alter it using the following commands, however it does require a little bit of scripting, but you can probably get it all in a trigger if you really need the commands: 

 

Quote

waypointLoiterRadius waypointLoiterType setWaypointLoiterRadius setWaypointLoiterType

 

Share this post


Link to post
Share on other sites
5 hours ago, mattyfo said:

I'm sure there are millions of topics on this, I've found most of them but am still stumped.

 

  So I basically want an enemy AI team to move to my location when I get spotted in a stealth mission and search the area since I will either leave or hide.  I named said ai group "qrf" and in a bluefor detected by ind trigger I have a "grf move getpos player; qrf setcombatmode red" it works well enough to get the ai to my last known position but when they get there they don't do anything.  They just sit in the truck.  How can I get them to disembark and search an area? Or instead of a move waypoint can I do a search and destroy waypoint in my initial trigger? It obviously is not called searchanddestroy because that just gave me an error.

 

Can I maybe spawn a trigger on my last know loc when the initial trigger activates so when qrf gets there it will activate another wp?

 

Looking for simple things with triggers not scripts as I just play out of the editor.

 

Any help is appreciated as I spent 2 hours trying things out and I have to sleep now!

There's a ton of solutions how you can do this, AI units usually disembark when in combat and the vehicle doesn't have any viable turrets.

Using only waypoints and triggers might work as well, but getting a reliable and easily adaptable solution you'd have to rely on scripts.

Something like this could be a start:


TAG_fnc_chase = {
	params ["_hunter","_hunted"];

	_chasePositions = [[-5,0,0],[5,0,0]];
	_prediction = 5;//will predict hunted position for n seconds considering it's speed

	while {alive _hunter AND alive _hunted} do {
		_distance = speed _hunted * 0.277778 * _prediction;
		_predictedPos = (_hunted modelToWorldVisual [5,25,0]) getPos [_distance,getDirVisual _hunted];

		_hunter domove _predictedPos;
		sleep 0.1;

	};


};

_chase = [hunter,hunted] spawn TAG_fnc_chase;

Basic script that could easily be adapted to works with a group chasing the player or similar.

Alternatively you could use BIS_fnc_stalk or customize it.

 

40 minutes ago, SM_BJS said:

Maybe try and use a loiter waypoint once they reach your position. If you want the loiter radius to be specific you can alter it using the following commands, however it does require a little bit of scripting, but you can probably get it all in a trigger if you really need the commands: 

 

 

Loiter waypoint doesn't work for ground units and acts like a move WP instead.

 

Cheers

  • 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

×