aeroson

Untitled

Oct 11th, 2014
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1.  
  2. _start = _this select 0;
  3. _direction = _this select 1;
  4. _amount = _this select 2;
  5. _i = 1;
  6.  
  7.  
  8. _selectclass = {
  9.  
  10. _class = ["BPZombie_Guardian1", "BPZombie_Guardian2", "BPZombie_Guardian3", "BPZombie_Hunter1", "BPZombie_Hunter2", "BPZombie_Hunter3", "BPZombie_Rebel1", "BPZombie_Rebel2", "BPZombie_Rebel3", "BPZombie_Refugee1", "BPZombie_Refugee2", "BPZombie_Refugee3", "BPZombie_Survivalist1", "BPZombie_Survivalist2", "BPZombie_Survivalist3"] call bis_fnc_selectrandom;
  11.  
  12.  
  13. };
  14.  
  15.  
  16. _spawnzombies = {
  17.  
  18. call _selectclass;
  19.  
  20. _zombiegroup = [getpos _start, EAST, [_class, _class, _class],[],[],[],[],[],_direction] call bis_fnc_spawngroup;
  21.  
  22. hint "test";
  23.  
  24. _units = units _zombiegroup;
  25.  
  26.  
  27. {_x enableSimulation true;} forEach _units;
  28.  
  29. _zombiegroup call _addwaypoints;
  30.  
  31. systemchat format ["%1", _zombiegroup];
  32.  
  33.  
  34.  
  35. };
  36.  
  37.  
  38. _addwaypoints = {
  39.  
  40. _zombiegroup = _this;
  41.  
  42. while {alive player} do {
  43.  
  44. _distance = random 2;
  45. _wdir = random 360;
  46. _wx = (getPos player select 0) + (_distance * (sin _wdir));
  47. _wy = (getPos player select 1) + (_distance * (cos _wdir));
  48. _wp = _zombiegroup addWaypoint [ [_wx,_wy] , 10, _i ];
  49.  
  50. if ( _i == 1 ) then {
  51. [_zombiegroup, _i] setWaypointBehaviour "AWARE";
  52. [_zombiegroup, _i] setWaypointCombatMode "RED";
  53. [_zombiegroup, _i] setWaypointFormation "COLUMN";
  54.  
  55. };
  56.  
  57.  
  58.  
  59.  
  60.  
  61. };
  62.  
  63.  
  64.  
  65. _wp = _zombiegroup addWaypoint [_start,10,_amount];
  66. [_zombiegroup, _amount] setWaypointType "CYCLE";
  67.  
  68.  
  69. };
  70.  
  71.  
  72. call _spawnzombies;
  73.  
  74.  
  75.  
  76. //_spawn = _class createUnit [getpos _start, group player, "zombiegrp1 = this; this enablesimulation true"];
Advertisement
Add Comment
Please, Sign In to add comment