Created
April 5, 2015 00:22
-
-
Save Neefay/9f00c46a79ac15414ebb to your computer and use it in GitHub Desktop.
Tracks a set of units
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ============================================================================ | |
| // | | |
| // 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