Jump to content
Sign in to follow this  
peacefull Nation

command to show all ai on map

Recommended Posts

{
        if(!isPlayer _x && side _x != playerSide) then {
player reveal _x
        }
    }forEach allUnits;

this code only reveals small portion of the map then goes away , i want it to reveal all the map

Share this post


Link to post
Share on other sites

Put this in your initPlayerLocal.sqf. This will add 2 radio commands. The first will show you number of EAST and WEST Units, and the second with show markers for all bad guys on the map for 10 seconds. then remove the markers. Don't forget to open the map after you run the radio command.

_trg1 = createTrigger ["EmptyDetector", getPos player, false];
_trg1 setTriggerActivation ["ALPHA", "PRESENT", true];
_trg1 setTriggerStatements ["this", "HintSilent composeText [parsetext format[""<t size='1'  font='EtelkaMonospaceProBold' shadow = '2' align='left' color='#f0e68c'>OPFOR Units   = <t color='#ff0000'>%1 <br/><t color='#f0e68c'>BLUFOR Units  = <t color='#436EEE'>%2"",(east countSide allUnits), (west countSide allUnits)]]",""];
_trg1 setTriggerText "Check Side Stats";

_trg2 = createTrigger ["EmptyDetector", [0,0,0]];
_trg2 setTriggerActivation ["BRAVO", "PRESENT", true];
_trg2 setTriggerStatements ["this", "null = [] execVM 'RevealTargets.sqf'",""];
_trg2 setTriggerText "Reveal Targets";

You will need this as well. Adapt to suit if you want to use reveal command.

 

RevealTargets.sqf

_markedmen =[];

    { if (_x IsKindof 'Man' && side _x isEqualTo east) then 
        {
            _marker = createMarkerlocal [format ["ManMarker_%1",_x], visiblePosition _x];
            format ["ManMarker_%1",_x] setMarkerTypelocal "Mil_dot";
            format ["ManMarker_%1",_x] setMarkerColorlocal "ColorRed";
            _markedmen pushBack [format ["ManMarker_%1",_x]];
        };
    } forEach allUnits;

sleep 10;

{deleteMarkerlocal (_x select 0)} foreach _markedmen;

 

  • Like 1

Share this post


Link to post
Share on other sites

thanks alot boss you guys are awesome.

am just noob in this game but not dumb to work with these codes.

 

quick learner and love learning these things.

 

Share this post


Link to post
Share on other sites

[] spawn {

  while {true} do {

  { if(!isPlayer _x && side _x != playerSide) then { player reveal [_x,4] } }forEach allUnits;

  sleep 60;

  }

};

Do u see the differences?

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  

×