Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SpawnFriendlyDogs()
- {
- self thread TurnDogsF();
- self thread DogTarget();
- self thread DogAttack();
- self thread SpawnTehDogs();
- }
- TurnDogsF()
- {
- self endon("death");
- self endon("disconnect");
- for(;;){
- dogs = GetAISpeciesArray( "axis", "dog" );
- for(i=0;i<dogs.size;i++){
- dogs[i].team = "allies";
- dogs[i].health = 9999;
- dogs[i].targetname = "zombie_dog";
- dogs[i].animname = "zombie_dog";
- dogs[i].grenadeawareness = 1;
- dogs[i].ignoreSuppression = false;
- dogs[i].suppressionThreshold = 0;
- dogs[i].noDodgeMove = false;
- dogs[i].pathenemylookahead = 1;
- dogs[i].is_zombie = false;
- dogs[i].isai = false;
- dogs[i].ai = false;}
- wait 0.05;
- }
- }
- DogTarget()
- {
- zombies = GetAISpeciesArray( "axis", "zombie" );
- zombiedogs = GetAiSpeciesArray( "allies", "dog" );
- for(d=0;d<zombies.size;d++)
- {
- for(i=0;i<zombiedogs.size;i++)
- {
- zombiedogs[i] setGoalPos(zombies[i].origin);
- }
- level waittill("zom_kill");
- wait 0.05;
- }
- }
- SpawnTehDogs()
- {
- dog_spawners = GetEntArray( "special_dog_spawner", "targetname" );
- maps\_zombiemode_dogs::special_dog_spawn( dog_spawners, 4 );
- }
- DogAttack()
- {
- while(1)
- {
- zombies = GetAISpeciesArray( "axis", "zombie" );
- zombiedogs = GetAiSpeciesArray( "allies", "dog" );
- for(d=0;d<zombies.size;d++)
- {
- for(i=0;i<zombiedogs.size;i++)
- {
- if(distance(zombiedogs[i].origin, zombies[d].origin) < 50)
- {
- zombies[i] dodamage(zombies[i].health + 666, zombies[i].origin);
- }
- level waittill("zom_kill");
- wait 0.05;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment