Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.77 KB | None | 0 0
  1. _playDest = [_this,0,0] call BIS_fnc_param;
  2. _locations = allMapMarkers select {_x find "area_" isEqualTo 0};
  3. _maxLocations = count _locations;
  4.  
  5. //Check
  6. if (_playDest >= _maxLocations) then {
  7.     hint "Wrong Play Destination. Random Generating New";
  8.     _playDest = floor (random [0, _maxLocations]);
  9. };
  10.  
  11. PLAY_LOCATION = _locations select _playDest;
  12.  
  13. //Move trigger and create marker for play area.
  14.  
  15. //Remove previous marker if any
  16. if !(isNil PLAY_LOCATION) then {
  17.     deleteMarker PLAY_LOCATION;
  18. };
  19.  
  20. trigger1 setPos (getMarkerPos PLAY_LOCATION);
  21.  
  22. _markerName = PLAY_LOCATION;
  23. _marker = createMarker [_markerName, getMarkerPos PLAY_LOCATION];
  24. _markerName setMarkerColor "ColorRed";
  25. _markerName setMarkerText "Play Area";
  26. _markerName setMarkerType "mil_warning";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement