Jump to content
Sign in to follow this  
CaptainBravo

How to have groups report contact with enemy?

Recommended Posts

Hey everyone,

I was wondering if someone knows how to have other groups (Lead by AI) on your side report enemy contact?

Thanks for your help.

Share this post


Link to post
Share on other sites

Thanks Splicer for the link. A very cool script but a more than what I need.

I just want a simple script that I implment for squads under my command using High Command (HC). Right now, My squads see and engage enemy without sending a word back to commander.

So I want squad leaders informing me of enemy presense.

I assumed it was simple .. of course the oppsoite might be true :)

Any ideas?

Share this post


Link to post
Share on other sites

hmm... i´d suggest using thefindNearestEnemy function...

roll a timed script so it checks from the leader of your groups every couple of seconds... if it doesn´t return null, then you´ll know there´s enemy around

Share this post


Link to post
Share on other sites

All u want is implemented in UPSMON, platoons of AI share known enemys to each others using a simple metod like this:

{

IF (_npc distance (_x) <= _sharedist ) THEN
{							
	_npc reveal (_x);					
};
} foreach _targets;		

_npc is leader group

_targets is an array of known targets

_sharedist is distance to share the information

not so simple is fullfilling _targets array:

{			
_knows=_npc knowsabout _x; 

if ((alive _x) && (_knows>0.2)) then {																	
	call (compile format ["KRON_targets%1 = KRON_targets%1 - [_x]",_sharedenemy]);				
	call (compile format ["KRON_targets%1 = KRON_targets%1 + [_x]",_sharedenemy]);																			
	 if ((_npc distance (_x) < _npc distance (_newtarget)) || !(alive (_newtarget))) then {
		_newtarget = _x					
	 };									 
	 if (_maxknowledge==4 && _newtarget == _x) exitWith {};					 
	_opfknowval=_opfknowval+_knows; 
	_maxknowledge=_knows;	
};		
} forEach _enemies;

y use dinamic arrays of enemys because of the side of AI will be different.

if u want to simplify only use _targets array.

Share this post


Link to post
Share on other sites

I think CaptainBravo is more looking for something like:

"GROUP ALPHA HERE - CONTACT - ENEMY PRESENCE AT XXX/YYY DETECTED - WE'RE READY TO ENGAGE"

and not how to reveal detected enemies.

Well i think you need to play around with knowsabout and revealing units and then

use sidechat and custom sounds (maybe you can take the ones from the game

already) to achieve that goal, unless there has been implemented something new

which i'm not aware off. ;)

~S~ CD

Share this post


Link to post
Share on other sites

Thanks everyone for your help. I am looking for something very similar to what Chris said, a very simple report enemy engagment. They just have a text messege saying they made contact with enemy. Nothing more. Right now groups in HC can get wiped out without even reporting once.

Will this require a lot of scripting??

Share this post


Link to post
Share on other sites

I don't think so. You just need the right commands. My first thought was to create triggers wich follow each group. The trigger executes via "detected by" and then gives a sidechat message with it's coordinates by using the posToGrid function. That's just a rough concept and i'm sure there're other or better ways to solve this issue. Anyway, i'd be interested in such script as well.

Share this post


Link to post
Share on other sites

You might want to consider converting General Barrons AI infoshare script from Ofp to Arma/Arma2 and adding a single sideChat line which should do the trick.

Share this post


Link to post
Share on other sites

Thanks everyone for the help. Not sure how to implments findNearestEnemy ..

Having a trigger follow a unit sounds great. But how?

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  

×