SHARE
TWEET

Untitled

a guest Sep 6th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Mech unit must be an array
  2. _mechUnit = param [0];
  3.  
  4. //Target is an object
  5. _target = param [1];
  6.  
  7. //Distance at which to stop
  8. _distance = param [2];
  9.  
  10.  
  11. //Returning the apc, assumes everyone is onboard.
  12. _apc = vehicle (_mechUnit select 0);
  13.  
  14. //Getting the group of the driver
  15. _driver = driver _apc;
  16. _groupDriver = group _driver;
  17.  
  18. //Chaning behaviour
  19. _groupDriver setCombatMode "YELLOW";
  20.  
  21. _cargo = [];
  22. _crew = [];
  23.  
  24. //Getting cargo
  25. {
  26.   if((assignedVehicleRole _x) select 0 == "Cargo") then
  27.   {
  28.     _cargo pushBack _x;
  29.   }
  30.   else
  31.   {
  32.     _crew pushBack _x;
  33.   }
  34. }forEach crew _apc;
  35.  
  36. //Moving
  37. units _groupDriver doMove (position _target);
  38.  
  39. //Wait until they are close
  40. waitUntil {_driver distance2D _target < _distance};
  41.  
  42. //Stopping the units
  43. {
  44.   doStop _x;
  45. }forEach _crew;
  46.  
  47. sleep 1;
  48. _movePos = position _target;
  49.  
  50. //Dropping and firing
  51. {
  52.   unassignVehicle _x;
  53.   doGetOut _x;
  54. }forEach _cargo;
  55.  
  56. //Move units and suppressive fire
  57. _cargo doMove _movePos;
  58.  
  59. _shooter = gunner _apc;
  60. if(_shooter == objNull) then
  61. {
  62.   _shooter = commander _apc;
  63. };
  64.  
  65. //Chaning behaviour
  66. _groupDriver setCombatMode "RED";
  67.  
  68. _shooter doSuppressiveFire _movePos;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top