I decided to push on a little further and did get something working.
If you want to try it go to the editor and place a player on an empty map.
Place the radar tower and name it radar and put this in the init
nul = [] execvm "Radar.sqf"
Then save the file.
Now just copy and past the code ARMEDIT or notepad and save as an Radar.SQF into the file you just save.
Place some aircaraft and see if it works.
// nul = [] execvm "Radar.sqf"
while {alive Tower} do
{
_myarray = nearestObjects [(getpos Tower), ["air"], 1000];
{
_marker = createMarker [str _x, GetPosASL _x];
_marker setMarkerType "Dot";
switch (side _x) do
{
case WEST:
{
_marker setMarkerColor "ColorBlue";
};
case EAST:
{
_marker setMarkerColor "ColorRed";
};
case CIVILIAN:
{
_marker setMarkerColor "ColorYellow";
if (!alive _x) then {
_marker setMarkerColor "ColorOrange";
};
};
};
_marker setMarkerText format ["%1", floor (GetPosATL _x select 2)] ;
_marker setMarkerPos getpos _x;
} foreach _myarray;
sleep 0.3;
{
deletemarker (str _x);
} foreach _myarray;
};
You don't have to use the radar tower a game logic would do.
OPFOR are RED
BLUFOR are BLUE
CIV's are Yellow
Crashed aircraft are Orange.
I've kept it quite simple, I'm sure it's been done many times before and to a much higher standard but for me it's just an exercise in coding.