Jump to content
Tyl3r99

How to make AI Hunt a player down while he is on the move?

Recommended Posts

basically im not an experienced mission maker with all the scripts etc but i know the basics and stuff so im happy...

i mostly play LAN with my brother etc..

anyway i want to create a mission where me and my brother are on the run after we have crash landed.

how would i get the enemy to hunt me and my brother down while we are on the move?

for example the AI would always travel to a ROUGH estimated location near us obviously not on our exact position etc..

any help or tips would be appreciated!!

Share this post


Link to post
Share on other sites

make your hunting squads in the editor, place this in init of each hunter squad:

_null = this spawn {
Hunt_players_fnc = {
	_player = "";
	{
		if (isPlayer _x AND alive _x) then {_player = _x};
	} foreach (playableUnits + switchAbleUnits);
	_wp = _this addWaypoint [getPos _player, (50 + (floor(random 200)))];
	_wp setWaypointStatements ["true", "_null = (group this) spawn Hunt_players_fnc;"];
	_wp setWaypointType "SAD";
	_wp setWaypointCombatMode "RED";
	_wp setWaypointSpeed "FULL";
};

_null = (group _this) spawn Hunt_players_fnc;
};

code creates a SAD wp in a random position 250 - 50m around one of the players, they will go search and destroy and when completed create again same way.

  • Like 1

Share this post


Link to post
Share on other sites
make your hunting squads in the editor, place this in init of each hunter squad:

_null = this spawn {
Hunt_players_fnc = {
	_player = "";
	{
		if (isPlayer _x AND alive _x) then {_player = _x};
	} foreach (playableUnits + switchAbleUnits);
	_wp = _this addWaypoint [getPos _player, (50 + (floor(random 200)))];
	_wp setWaypointStatements ["true", "_null = (group this) spawn Hunt_players_fnc;"];
	_wp setWaypointType "SAD";
	_wp setWaypointCombatMode "RED";
	_wp setWaypointSpeed "FULL";
};

_null = (group _this) spawn Hunt_players_fnc;
};

code creates a SAD wp in a random position 250 - 50m around one of the players, they will go search and destroy and when completed create again same way.

this is why i have a lot of respect for the arma community....

which values can i change to widen or closen the radius of waypoint? and can i change the combat mode? i.e. normal, danger etc... im guessing combat mode red is danger?

also when you say each squad do you mean just the leader yeah?

thanks again mate just going to try this out now!!

Share this post


Link to post
Share on other sites

works like a charm... thanks a lot guys.

is there any other neat codes like this one i could have fun with??

Share this post


Link to post
Share on other sites

Well there are almost 9500 threads in this sub-forum, so I would say yes, but if you were to be a bit more specific I may be able to point you in a direction. (Code snippets such as the two in my signature usually have fun, neat things that they do)

Share this post


Link to post
Share on other sites

tyl3r99 in the future for any AI related questions, problems, ideas, please review my Ai list before you post a thread as your question

and whatever else may have already been answered. see my list:

AI Compilation List of Addons/Mods/Scripts & Misc

also in my sig.

As for the question you had asked in your OP, there is a section for this specifically with about 8 threads listed there.

I will add your thread here to that list when I update the list again only because you have something specific for the AI for when they hunt you.

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

×