Results 1 to 1 of 1
  1. #1
    Santahunter's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0

    Unhappy My Killstreak hates me

    Hi, I made my own killstreak. It is similar to the Swarm-Killstreak in Black Ops 2. Sadly The UAVs aren't attacking the enemies, they only attack me and this shouldn't be. Hopefully someone can help me to find the error :P I think it has something to do with the "victim" and the "owner".

    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;

    Swarm(victim)
    {
    PrecacheVehicle( "harrier_mp" );
    self endon("death");
    self endon("disconnect");
    self endon("senfbaum");
    owner = self;
    self iPrintlnBold("Wait for the UAV-Setup...");
    swarm = spawnHelicopter(self, self.origin + (50, 0, 500), self.angles, "harrier_mp", "vehicle_uav_static_mp");
    swarm2 = spawnHelicopter(self, self.origin + (50, 0, 500), self.angles, "harrier_mp", "vehicle_uav_static_mp");
    swarm3 = spawnHelicopter(self, self.origin + (50, 0, 500), self.angles, "harrier_mp", "vehicle_uav_static_mp");
    swarm4 = spawnHelicopter(self, self.origin + (50, 0, 500), self.angles, "harrier_mp", "vehicle_uav_static_mp");
    //player = level.players[randomInt(level.players.size)];
    foreach(player in level.players)
    {
    //if(player != owner)
    //{
    //wait 2;
    player thread attacking(swarm, swarm2, swarm3, swarm4, owner, player);
    //}
    }
    self thread end();
    wait 0.3;
    for(;
    {
    swarm Vehicle_SetSpeed(1000, 16);
    swarm2 Vehicle_SetSpeed(1000, 16);
    swarm3 Vehicle_SetSpeed(1000, 16);
    swarm4 Vehicle_SetSpeed(1000, 16);
    swarm setVehGoalPos(self.origin + (0, 0, 501), 1);
    swarm2 setVehGoalPos(self.origin + (300, 0, 501), 1);
    swarm3 setVehGoalPos(self.origin + (0, 300, 501), 1);
    swarm4 setVehGoalPos(self.origin + (300, 300, 501), 1);
    wait 0.05;
    }
    }

    attacking(swarm, swarm2, swarm3, swarm4, owner, victim)
    {
    self endon("death");
    self endon("disconnect");
    self endon("senfbaum");
    self iPrintlnBold("Press ^5F ^7to activate a ^3Hunter-UAV");
    self notifyOnPlayerCommand("F", "+activate");
    self waittill("F");
    MagicBullet( "ac130_105mm_mp", swarm.origin+(0,0,-100), victim.origin , owner );
    swarm delete();
    self waittill("F");
    MagicBullet( "ac130_105mm_mp", swarm2.origin+(0,0,-100), victim.origin , owner );
    swarm2 delete();
    self waittill("F");
    MagicBullet( "ac130_105mm_mp", swarm3.origin+(0,0,-100), victim.origin , owner );
    swarm3 delete();
    self waittill("F");
    MagicBullet( "ac130_105mm_mp", swarm4.origin+(0,0,-100), victim.origin , owner );
    swarm4 delete();

    }

    end(swarm, swarm2, swarm3, swarm4)
    {
    self waittill("death");
    self notify("senfbaum");
    swarm delete();
    swarm2 delete();
    swarm3 delete();
    swarm4 delete();
    }
    Last edited by Santahunter; 12-17-2012 at 11:01 AM.

Similar Threads

  1. Computer-HATE thread
    By poulet28 in forum Spammers Corner
    Replies: 20
    Last Post: 12-11-2006, 05:55 PM
  2. Reason why americans hate soccer.
    By Dave84311 in forum General
    Replies: 0
    Last Post: 07-13-2006, 08:34 PM
  3. Forums are 180 days old! And forums hate me :/
    By Dave84311 in forum News & Announcements
    Replies: 0
    Last Post: 06-24-2006, 08:30 PM
  4. how much you hate curse?
    By gunot in forum General
    Replies: 54
    Last Post: 05-13-2006, 10:32 PM
  5. God hates sweden???? :S
    By gunot in forum General
    Replies: 9
    Last Post: 01-22-2006, 06:33 PM

Tags for this Thread