ItsMods

Full Version: [untested] Controlable Attack Dog
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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);
                }
            }
        }
    }
}
I did it already. Big Grin


But anyways, looks good.

EDIT: Nevermind, it's just specting?
(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