VanhA 10 Posted July 2, 2008 I need to adjust one mission where we can't find the last enemies who are sooo elusive.... I thought I'd make a trigger which by radio call shows enemies when the number is 5 or smaller. One trigger activated by OPFOR called "Area1" and second radio trigger with <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Player sideChat format ["%1",list Area1] (from Mr.Murray's editing guide) Now which line would work better in Area1 condition field?: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x count units in thisList <=5} forEach thisList or <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">({_x in thisList} count thislist) <= 5 or does neither of them work? Any other suggestions are welcome. Share this post Link to post Share on other sites
poweruser 10 Posted July 2, 2008 Quote[/b] ]<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Player sideChat format ["%1",list Area1] This will print a chat message like this:     1-1-A 1 (VanhA): "[EAST 1-1-B:1,EAST 1-1-C:1,EAST 1-1-D:1,EAST 1-1-E:1,EAST 1-1-F:1]" Not really helpful to find them. Quote[/b] ]Now which line would work better in  Area1 condition field?:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x count units in thisList <=5} forEach thisList or <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">({_x in thisList} count thislist) <= 5 or does neither of them work? Simply <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">count thislist <= 5to check the number of units inside the trigger area. ================================================== I played around with your idea and created this: It creates markers on the map for the units inside the trigger area. Adds markers for units which enter the area and removes markers for units which have been killed or leave the area. the sqf file "showEnemies.sqf": <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private["_a","_b","_x","_trigger","_markersAll","_markersOfAliveUnits"]; _trigger = _this select 0; VanhA_showEnemies = true; _markersAll = []; while { VanhA_showEnemies } do {    _markersOfAliveUnits = [];    {        if(!(format["%1", name _x] in _markersAll)) then {           // creating a marker for a new unit in the trigger zone           _a = createMarkerLocal[name _x, getpos _x];           _a setMarkerColor "ColorRed";           _a setMarkerSize [0.5,0.5];           _a setMarkerType "Arrow";           _a setMarkerDir getDir _x;           _markersAll = _markersAll + [_a];           _markersOfAliveUnits = _markersOfAliveUnits + [_a];        } else {           // updating the triggers of units which already have a marker           _b = format["%1", name _x];           _b setMarkerDir getDir _x;           _b setMarkerPos getPos _x;           _markersOfAliveUnits = _markersOfAliveUnits + [_b];        };    } forEach list _trigger;    sleep 0.5;    // deleting markers of dead enemies or units outside the trigger area    {        if(!(_x in _markersOfAliveUnits)) then {           deleteMarkerLocal _x;        };    } forEach _markersAll;    _markersAll = _markersOfAliveUnits;    sleep 0.5; }; // markers got disabled, delete them {    deleteMarkerLocal _x; } forEach _markersAll; true In the init.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">VanhA_showEnemies = false; - Create your Area1 trigger, leave the default "Condition" and "On Activation" - Create 1 radio call trigger   Condition:   count list Area1 <= 5      On Activation:  if(!Vanha_showEnemies) then { vanhA_handle = [Area1] execVM "showEnemies.sqf"; } else { VanhA_showEnemies = false; }; Share this post Link to post Share on other sites
VanhA 10 Posted July 3, 2008 @ dengibtsschon Thanks a million, I'll try this out this weekend. If this works it saves the nerves from our squad using last 45 mins of mission trying to find 1 enemy. I almost gave up on search and thought I'd just change the end condition trigger to "Seized by". What a great community in here... VanhA (WASP squad ArmA regiment leader) ps. If I get this to work I'll be releasing the mission for public soon. EDIT: Works like a charm! Thousand thanks. Share this post Link to post Share on other sites