Skip to content

Instantly share code, notes, and snippets.

@Petethegoat
Last active August 29, 2015 13:57
Show Gist options
  • Save Petethegoat/9437869 to your computer and use it in GitHub Desktop.
Save Petethegoat/9437869 to your computer and use it in GitHub Desktop.
This will move a unit to a random marker, and rotate it in the direction of that marker. Supports any number of markers.
//This will move a unit to a random marker, and rotate it in the direction of that marker. Supports any number of markers.
//Usage:
//null = [this, "mrk_1", "mrk_2", "mrk_3", "mrk_x"] execVM "ptg_pickMarker.sqf";
_unit = _this select 0;
_pick = (floor random ((count _this) - 1)) + 1;
_marker = _this select _pick;
_unit setPosATL getMarkerPos _marker;
_unit setDir markerDir _marker;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment