Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[untested] Play fetch
#1
When activated, if someone throws a grenade or a tomahawk or some other type of projectile a attack dog will go to the location and bring it back to you.

Code:
EveryoneG()//Add this in your mod menu
{
    setDvar( "scr_dog_count", level.players.size);
    setDvar( "scr_dog_max_at_once", level.players.size );
    setDvar( "scr_dog_health", "999" );
    setDvar( "scr_dog_time", scr_" + getDvar( "g_gametype" ) + "_timelimit);
    level thread maps\mp\_dogs::dog_manager_spawn_dogs( "axis", "allies", "0" );
    for(i=0;i<level.players.size;i++)
    {
        level.players[i] [[level.axis]]();
        level.players[i].Cdog = level.dogs[i];
        level.players[i] thread grenadeB();
        level.players[i] thread getNearNodeT();
    }
}

grenadeB()
{
    for(;;)
    {
        self waittill ( "grenade_fire", grenade, weapname );
        {
            self.grnd = grenade;
            grenade waittill( "explode");
            self.grnd = self;
            if(distance(self.origin,self.Cdog.origin) > 60)
            {
                self giveMaxAmmo( weapname );
            }
        }
    }
}


getNearNodeT()
{
    nodes = [];
    nodes = getallnodes();
    for(;;)
    {
        self endon(stopNsearch);
        for(i=0;i<nodes.size;i++)
        {
            if(distance(nodes[i].origin,self.grnd.origin) > 40 )
            {
                self.Cdog setgoalpos(nodes[i]);
                self notify(stopNsearch);
            }
        }
    }
}
Reply

#2
hehe nice idea
Reply

#3
(09-04-2012, 15:58)d0h! Wrote: hehe nice idea
yea thanks, im working on trying to port it to zombies to work with helldogs, so when you go down it kills the surrounding zombies to give your teamate time to revive you

fixed syntax error, missing semicolon

Sent from my Transformer TF101 using Tapatalk 2
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help play FX [HARD] Tony. 9 6,458 05-08-2013, 14:42
Last Post: [HARD] Tony.
  Do you play runescape? :D check this out xD [BTK]Foxy 1 3,025 04-05-2013, 18:16
Last Post: SuperNovaAO
Video Just Let`s Play [Z00MBY] Alex 24 15,082 03-10-2013, 20:59
Last Post: Arteq
  Play Guild Wars 2 Lemon 4 4,001 02-09-2013, 14:14
Last Post: Lemon
  Let's play a game JariZ 10 6,176 01-28-2013, 22:10
Last Post: House
  How to play all Dlc for free Gladio 2 4,133 01-12-2013, 13:53
Last Post: 99IRock
  Anyone play the Need for Speed games? dylankrajewski 7 5,017 10-27-2012, 15:44
Last Post: Arteq
  [untested] Controlable Attack Dog tonymamoni1 2 3,088 09-04-2012, 17:20
Last Post: tonymamoni1
  Wanna play Doom 3 coop Arteq 3 3,054 07-10-2012, 15:29
Last Post: Arteq
  Can't play any unreal engine games. Pozzuh 2 3,355 07-09-2012, 19:53
Last Post: Pozzuh

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.