Skip to content

Instantly share code, notes, and snippets.

@Neefay
Created April 5, 2015 00:22
Show Gist options
  • Select an option

  • Save Neefay/9f00c46a79ac15414ebb to your computer and use it in GitHub Desktop.

Select an option

Save Neefay/9f00c46a79ac15414ebb to your computer and use it in GitHub Desktop.
Tracks a set of units
// ============================================================================
// |
// This script will be run only for the Players. |
// |
// ============================================================================
// =============================================================================
sleep 1;
// Anything below this line will only be executed beyond the briefing screen. |
// =============================================================================
_allUnits = [blu_1_1_1, blu_1_1_2, blu_1_1_3, blu_1_1_4, blu_1_2_1, blu_1_2_2, blu_1_2_3, blu_1_2_4];
_updateInterval = 1;
_markerText = "Tracked unit";
_markerColor = "ColorRed";
_markerIcon = "hd_destroy";
if (side player == side_a_side) then {
while {true} do {
_allMarkers = [];
{
if (alive _x) then {
_marker = ["local", (getPos _x), _markerIcon, _markerColor, _markerText, [0.8,0.8], 0, 1] call BRM_fnc_newMarkerIcon;
_allMarkers pushBack _marker;
};
} forEach _allUnits;
sleep _updateInterval;
{ deleteMarker _x } forEach _allMarkers;
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment