Jump to content
magicpanda

Show all units on map (aka Satellite Feed Script)

Recommended Posts

I dug this old script out from Arma 2 and updated a little to work with Arma 3 (show independents as green).

 

I've come to a bit of a road block. I'm trying to work out how to turn it on and off in via radio trigger command. for example in a 30 second burst. 

 

Any help greatly appreciated. Bonus points for adding civilian markers instead of just black for everything dead or civ, my failed attempt is commented out :) 

 

My On Act: doesn't work

nul = execVM "eye.sqf"; sleep 30; EYE_run = false;
Here is the script.
 
/*


EYE 1.0
Author: Zapat
Shows all units on map in a relatively system friendly way.


Dot: infantry
Rectangle: ground vehicles
Triangle: air vehicles


Blue: west
Red: east
Green: Independent
Black: civilian OR damaged in movement thus left vehicle


Orange: player
Yellow: player's team


*/


//you can turn on and off the EYE by the following Global Variable 
EYE_run = true;






player sideChat "EYE is running";


EYE_targets_obj = [];
EYE_markers_str = [];


//data handler


[] spawn 
{
    while {EYE_run} do
    {
        sleep 2;


        EYE_targets_obj = position player nearEntities [["LandVehicle","Air","CAManBase"], 20000];
  
        EYE_targets_str = [];


        {


            EYE_targets_str set [count EYE_targets_str, format["%1",_x]];


        }foreach EYE_targets_obj;


        _deleted = EYE_markers_str - EYE_targets_str;


        {
            deleteMarker _x;


            EYE_markers_str = EYE_markers_str - [_x];


        }foreach _deleted;


    };


    player sideChat "EYE thread 1 finished" ;


};






//visualiser


[] spawn


{


    while {EYE_run} do


    {


        sleep 0.1;


        {


            if (!isNull _x) then


            {


                _marker = format["%1",_x];


                //create marker


                if (getMarkerType _marker == "") then


                {


                    _m = createMarker[_marker,position _x];


                    


                    _m setMarkerShape "ICON";


                    


                    if (_x isKindof "CAManBase") then {_m setMarkerType "hd_dot";};
                    if (_x isKindof "LandVehicle") then {_m setMarkerType "mil_box";};                    
                    if (_x isKindof "Air") then {_m setMarkerType "mil_triangle";};
                   


                    if (side _x == east) then {_m setMarkerColor "ColorOPFOR";};
                    if (side _x == west) then {_m setMarkerColor "ColorBLUFOR";};
                    if (side _x == Independent) then {_m setMarkerColor "ColorIndependent";};
                  //if (side _x == Civilian) then {_m setMarkerColor "ColorCivilian";};
                   


                    if (_x in units group player) then {_m setMarkerColor "ColorYellow";};
                    if (_x == player) then {_m setMarkerColor "ColorOrange";};


                    EYE_markers_str set [count EYE_markers_str, _marker];


                }


                //update marker


                else


                {


                    _marker setMarkerPos position _x;


                    if (getMarkerColor _marker != "ColorBlack" && (!alive _x || !canMove _x) ) then {_marker setMarkerColor "ColorBlack"};


                };


            };


        }foreach EYE_targets_obj;


    };


    


    {


        deleteMarker _x;


    }foreach EYE_markers_str;


    player sideChat "EYE thread 2 finished" ;


};

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

×