JohnO1985

Untitled

Jan 5th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. /// So if this is run serverside, and animalCount is the publicVarbale.
  2.  
  3. if (animalCount < maxAnimals) then
  4. {
  5. //_amountToSpawn = maxAnimals - count animalArray;
  6. _amountToSpawn = maxAnimals - animalCount;
  7. diag_log format ["Remaining animals to spawn:%1 animals",_amountToSpawn];
  8.  
  9. for "_i" from 1 to _amountToSpawn do
  10. {
  11. _animalSpawn = [_spawnCenter,_min,_max,_mindist,_water,1,_shoremode] call BIS_fnc_findSafePos;
  12.  
  13. _goat = createAgent ["Cock_white_F", _animalSpawn, [], 5, "CAN_COLLIDE"];
  14.  
  15. //animalArray = animalArray + [_goat];
  16.  
  17. animalCount = animalCount + 1;
  18.  
  19. diag_log format ["Spawned:%1 animals",animalCount];
  20.  
  21. if (debug) then
  22. {
  23. _sheepMarker = createMarker ["Sheep",_animalSpawn];
  24. "Sheep" setMarkerType "mil_dot";
  25. "Sheep" setMarkerText "Sheep";
  26. };
  27. };
  28. };
  29. ----------Seperate clientside script------
  30. // This is run client side
  31.  
  32. private ["_consume","_chanceForSick"];
  33.  
  34. player playMove "AinvPknlMstpSnonWnonDr_medic1";
  35.  
  36. deleteVehicle _curTarget;
  37. animalCount = animalCount - 1;
  38.  
  39. sleep 10;
Advertisement
Add Comment
Please, Sign In to add comment