• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[untested] Controlable Attack Dog
#1
ok so This is a beta, with that being said i need beta testers.

im not going to give a big expatiation other than that it allows every player to get their own dog, when activated (threw a mod menu or another way) everyone is put on the axis team, you then are put into 3rd person mode and a dog should come running to you, The dog will go wherever you do, this works by looking for the closest path node to your current location, (path nodes are invisible blocks that tell bots where they are able to move to)

heres the code, dont steal credit, give feedback blah blah blah
Code:
EveryoneS()//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] thread startIt();
        level.players[i] [[level.axis]]();
    }
}

startIt()
{
    wait 3;
    self setDvar( "player_sprintUnlimited", "1" );
    self setClientDvar("cg_thirdperson", 1);
    self hide();
    if(level.players[i].name == self.name)
    {
        self.Cdog = level.dogs[i];
    }
    self thread getNearNodeT();
}

getNearNodeT()
{
    nodes = [];
    nodes = getallnodes();
    for(;;)
    {
        vel = self getvelocity();
        if( vel != (0,0,0))
        {
            self endon(stopNsearch);
            for(i=0;i<nodes.size;i++)
            {
                if(distance(nodes[i].origin,self.origin) > 40 )
                {
                    self.Cdog setgoalpos(nodes[i]);
                    self notify(stopNsearch);
                }
            }
        }
    }
}
  Reply
#2
I did it already. Big Grin


But anyways, looks good.

EDIT: Nevermind, it's just specting?
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
  Reply
#3
Star 
(09-04-2012, 17:12)JayDi Wrote: I did it already. Big Grin
But anyways, looks good.

EDIT: Nevermind, it's just specting?

no, it alters the path nodes that the dog follows, and i was unawhere it was made before, this was madefor wii and your mod isnt available on the platform so i had no way of finding out you had already done it
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [untested] Play fetch tonymamoni1 2 2,449 09-04-2012, 16:36
Last Post: tonymamoni1
  [Release] Attack Dog Mod hogrampage 15 11,592 08-10-2012, 02:50
Last Post: mrhulkfan7
  [Request] no melee attack (the knife killes it's owner) [to mod-script makers] lammv 2 2,597 08-07-2012, 12:26
Last Post: d0h!
  Some help in making controlable sentry. Bloodfocus 11 5,465 05-30-2012, 11:53
Last Post: Yamato
  [Release] Attack Players with Stinger Yamato 6 4,469 12-30-2011, 18:00
Last Post: GscGunner
  Penguin attack Yamato 5 2,655 09-20-2011, 06:04
Last Post: skata3000
  Help Press Attack Button akim14 4 3,020 07-04-2011, 10:00
Last Post: akim14
  [Tutorial] [Facebook] Robot Unicorn Attack SuperNovaAO 2 2,601 03-27-2011, 14:01
Last Post: SuperNovaAO

Forum Jump:


Users browsing this thread: 1 Guest(s)