Jump to content
Sign in to follow this  
jakkob4682

Script Help(Send sitrep)

Recommended Posts

Looking for a script that

1. Checks if unit knows about another unit enough to determine type,side, etc.

2. Sends pertinent information about the target unit to player(direction target is moving, speed of the target, distance from the observing unit, relative strength of the tracked unit(is he in a group or not? how many enemies are near the target).

3. refreshes the above info every minute or so.

_scout = _this select 0;// unit tracking the target
_target = _this select 1;//unit being tracked

_info = [];

_kbLvl = _scout knowsAbout _target;// how much does the scout need to know to determine type,side, etc?
_dir = getDir _target;
_speed = getSpeed _target;
_strength = 0;
_distance = _scout distance _target;
_grp = group _target;
_grpCount = count units _grp;
if(_grpCount > 1)then
{
_strength = _strength + _grpCount;
_friends = [];
_unitsNear = nearestObjects [_target,["CAManBase"],100];
{
if(_x getFriend _target > 0.6)then
{
_friends set [(count _friends),_x];
_fCount = count _friends;
_strength = _strength + _fCount;
};
_info = [(getPosASL _tgt),_dir,_speed,_distance,_strength];
hintFormat ["%1",_info];

will that do what I want?

Edited by jakkob4682

Share this post


Link to post
Share on other sites

Seems, it works. Is any errors in RPT files?

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  

×