Advertisement
Guest User

Untitled

a guest
Nov 4th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. if(isServer)then
  2. {
  3. //make the vip's group
  4. vip_defence_group = group vip_defence_teamleader;
  5. [vip,vip_defence_officer,vip_driver] joinSilent vip_defence_group;
  6.  
  7. {
  8. if (_x == vip_driver) then {
  9. _x assignAsDriver hunter_unarmed
  10. } else {
  11. _x assignAsCargo hunter_unarmed
  12. };
  13. } foreach units vip_defence_group;
  14. (units vip_defence_group) orderGetIn true;
  15.  
  16. waitUntil {count crew hunter_unarmed == 4};
  17.  
  18. //i have to do it this way because thanks bohemia
  19. hunter_unarmed_group = group hunter_unarmed;
  20. hunter_armed_group = group hunter_armed;
  21.  
  22. //set up waypoints
  23. _waypoint2marker=_this select 0; //first argument received is the first waypoint the hunters will move to
  24. _waypoint3marker=_this select 1; //the second argument is the house they'll hide in
  25. _waypoint4marker=_this select 2;
  26.  
  27. //tell hunters to move
  28. _wp2u = hunter_unarmed_group addWaypoint [getmarkerpos _waypoint2marker, 0];
  29. _wp2u setWaypointType "MOVE";
  30. _wp2a = hunter_armed_group addWaypoint [getmarkerpos _waypoint4marker, 0];
  31. _wp2a setWaypointType "MOVE";
  32.  
  33. //when hunter is close to the waypoint end tell infantry to leave the hunter
  34. waitUntil {hunter_unarmed distance (getmarkerpos _waypoint2marker) < 10};
  35.  
  36. {_x leaveVehicle hunter_unarmed} foreach units vip_defence_group;
  37.  
  38.  
  39. _position = getPos vip;
  40. _house = nearestBuilding vip;
  41. _x = 0;
  42. _y = 0;
  43. _t = 0;
  44. _timeout = 0;
  45. _notbugged = true;
  46. _name = vehicleVarName vip;
  47. if (isNil _name) then {_name = "guard"};
  48.  
  49. vip setBehaviour "SAFE";
  50.  
  51. while { format ["%1", _house buildingPos _x] != "[0,0,0]" } do {_x = _x + 1};
  52. _x = _x - 1;
  53. vip setpos (_house buildingPos 1);
  54.  
  55.  
  56.  
  57. _position = getPos vip_defence_officer;
  58. _house = nearestBuilding vip_defence_officer;
  59. _x = 0;
  60. _y = 0;
  61. _t = 0;
  62. _timeout = 0;
  63. _notbugged = true;
  64. _name = vehicleVarName vip_defence_officer;
  65. if (isNil _name) then {_name = "guard"};
  66.  
  67. vip_defence_officer setBehaviour "SAFE";
  68.  
  69. while { format ["%1", _house buildingPos _x] != "[0,0,0]" } do {_x = _x + 1};
  70. _x = _x - 1;
  71. vip_defence_officer setpos (_house buildingPos 1);
  72.  
  73.  
  74. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement