Page 1 of 1

Dog Scripts

Posted: Wed Jun 05, 2002 11:26 pm
by mapnewbie
I have the scripts for making dogs chase and attack, but I can't seem to get them to work in my map. Here's the script, any idea how to get this to work. When I add this to my existing script, the game crashes. Thanks


//------
// Dog Attack
//------

waitexec "anim/dog_inithandler.scr"

//======================================================================
AttackMain:

self setmotionanim dog_bite_leg

wait .1

//bite enemy
if ( self . enemy != $player )
self.enemy damage self 75 self (0 0 0) (0 0 0) (0 0 0) 1 9 0 0;
else
{
local . dir = $player . origin - self . origin;
self.enemy damage self 75 self (0 0 0) local . dir (0 0 0) 1 9 0 0;
}

self waittill flaggedanimdone

goto AttackMain
end

//------
// Dog Chase
//------

waitexec "anim/dog_inithandler.scr"

//======================================================================
ChaseMain:

//chase enemy
self setmotionanim dog_run
self waittill flaggedanimdone

goto ChaseMain
end

Posted: Thu Jun 06, 2002 5:07 pm
by tstrait72
thats not what u want to use. open the scr for the sample map 'm4|0' that came with the editor and look at how they did it. also open the map file and find the dogs in there to see what entity properties they were given. it may take a little time to figure it out...

Posted: Wed Jun 12, 2002 10:36 pm
by Gener_AL
Okay this one had me a bit stumped for a while.....
all you need for dog_ai to work are info_pathnodes {paced between 256-512}appart if they are to far appart the dog will not chase...just bark... oh yeh and add the line "exec global/ai.scr" in your .scr
that should be it....oops i almost forgot dont play around to much with dogs properties...it just naffs up its ai for some inexplicable reason..

p.s. Nemesis if your reading i like your work but if you make another tut using my brainstuff{or anyone else`s}.....{it could be coincidence..} please give credit where its due......pls :D

Posted: Sun Jun 30, 2002 11:55 pm
by HkySk8r187
Gener_AL, I did what you said and it worked. The only thing is that one bite and you're dead. Any way to make the dogs attack take away less health? Thanks.

dogs

Posted: Tue Feb 25, 2003 7:49 am
by bdbodger
when ever I kill a dog the game crashes I have lots of pathnodes and a sound fix and dogs work good but I can't kill them or game crashe with a server message past end error

Posted: Tue Feb 25, 2003 9:03 am
by jv_map
Whoa that's an old thread :shock:.

Maybe this is of any help:
http://modtheater.com/pafiledb.php?action=file&id=540

Posted: Tue Mar 04, 2003 1:18 am
by bdbodger
thanks jv but all I had to do was $dog1 exec anim/dog_inihandler.scr I didn't do that

Posted: Thu Mar 06, 2003 5:37 am
by bdbodger
ok ok you where right jv the dog died ok a couple of times then same thing so I downloaded the dog fix and all is ok again . Only thing is Vonderbakluft said to put his pk3 in main/maps that is not right it goes in main . I am going to redo my dog bot for mp to include this missing part . thanks .