Dog Scripts
Posted: Wed Jun 05, 2002 11:26 pm
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
//------
// 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