coolbunny1234

Untitled

Jul 17th, 2011
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. SpawnFriendlyDogs()
  2. {
  3.  
  4. self thread TurnDogsF();
  5. self thread DogTarget();
  6. self thread DogAttack();
  7. self thread SpawnTehDogs();
  8.  
  9. }
  10.  
  11. TurnDogsF()
  12. {
  13. self endon("death");
  14. self endon("disconnect");
  15. for(;;){
  16. dogs = GetAISpeciesArray( "axis", "dog" );
  17. for(i=0;i<dogs.size;i++){
  18. dogs[i].team = "allies";
  19. dogs[i].health = 9999;
  20. dogs[i].targetname = "zombie_dog";
  21. dogs[i].animname = "zombie_dog";
  22. dogs[i].grenadeawareness = 1;
  23. dogs[i].ignoreSuppression = false;
  24. dogs[i].suppressionThreshold = 0;
  25. dogs[i].noDodgeMove = false;
  26. dogs[i].pathenemylookahead = 1;
  27. dogs[i].is_zombie = false;
  28. dogs[i].isai = false;
  29. dogs[i].ai = false;}
  30. wait 0.05;
  31. }
  32. }
  33. DogTarget()
  34. {
  35. zombies = GetAISpeciesArray( "axis", "zombie" );
  36. zombiedogs = GetAiSpeciesArray( "allies", "dog" );
  37. for(d=0;d<zombies.size;d++)
  38. {
  39. for(i=0;i<zombiedogs.size;i++)
  40. {
  41. zombiedogs[i] setGoalPos(zombies[i].origin);
  42. }
  43. level waittill("zom_kill");
  44. wait 0.05;
  45. }
  46. }
  47. SpawnTehDogs()
  48. {
  49. dog_spawners = GetEntArray( "special_dog_spawner", "targetname" );
  50. maps\_zombiemode_dogs::special_dog_spawn( dog_spawners, 4 );
  51. }
  52. DogAttack()
  53. {
  54. while(1)
  55. {
  56. zombies = GetAISpeciesArray( "axis", "zombie" );
  57. zombiedogs = GetAiSpeciesArray( "allies", "dog" );
  58. for(d=0;d<zombies.size;d++)
  59. {
  60. for(i=0;i<zombiedogs.size;i++)
  61. {
  62. if(distance(zombiedogs[i].origin, zombies[d].origin) < 50)
  63. {
  64. zombies[i] dodamage(zombies[i].health + 666, zombies[i].origin);
  65. }
  66. level waittill("zom_kill");
  67. wait 0.05;
  68. }
  69. }
  70. }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment