Code: Select all
$dog setmotionanim dog_walk_bored
$dog glue $paraIf I type:
Code: Select all
$dog setmotionanim dog_walk_bored
$dog bind $paraModerator: Moderators
Code: Select all
$dog setmotionanim dog_walk_bored
$dog glue $paraCode: Select all
$dog setmotionanim dog_walk_bored
$dog bind $paraCode: Select all
$dog turnto $para
$dog setmotionanim dog_walk_boredCode: Select all
$dog walkto $wp1Code: Select all
$dog turnto $wp1
$dog setmotionanim dog_walk_bored
wait 11
$dog anim dog_restCode: Select all
level.script = patrol_path.scr
$para exec global/patrol_path.scr::patrol $path4
$para waittill movedone
$dog walkto $path4
$dog waittill movedone
$para exec global/patrol_path.scr::patrol $path5
$dog walkto $path5
$dog waittill movedone
$dog anim dog_rest
wait 2
$dog animscript "anim/continue_last_anim.scr"Code: Select all
dog_follow local.dogguy:
println "dog thread active "
self.destination = local.dogguy
self.distance = 128
self.waittime=1
self.friendrange = 128
local.dmteam = local.dogguy.dmteam
while ((isalive self)&&( isalive local.dogguy )&&(local.dogguy.hasdog==1)&&(local.dogguy.dmteam == local.dmteam))
{
if !(self.thinkstate==attack)
self waitthread follow_player local.dogguy
waitframe
}
local.dogguy.hasdog=0
println "Dog thread ending"
end
follow_player local.followed:
self.destination = local.followed
local.movethread = -1
self.movedoneradius = self.distance
if (vector_length (self.destination.origin - self.origin) > self.distance + self.friendrange)
{
self runto self.destination.origin
local.stand = 0
self waittill movedone
if !(self.destination)
self.destination = null
if (vector_length (self.destination.origin - self.origin) < self.distance + self.friendrange)
{
self exec global/stand.scr
}
}
else
{
if (local.stand == 0)
{
self exec global/stand.scr
local.stand = 1
}
wait 1
}
if (vector_length (self.destination.origin - self.origin) > self.distance + self.friendrange)
{
self runto self.destination.origin
local.stand = 0
thread movedone
local.movethread = parm.previousthread
}
if ((local.movethread != -1) && (local.movethread != NIL))
local.movethread delete
local.dest = self.destination.origin
local.runnertime = level.time + 2
while (((self.movedone == 0) && (vector_length (local.dest - self.origin) > (self.distance + self.friendrange))) && (local.runnertime > level.time))
{
if (self.waittime == -1)
waitframe
else
wait self.waittime
}
end
////////////////////////////////////////////////////////////
movedone:
self.movedone = 0
self waittill movedone
self.movedone = parm.movedone
endTake out the hasdog and dm lines those were for something elsewhile ((isalive self)&&( isalive local.dogguy )&&(local.dogguy.hasdog==1)&&(local.dogguy.dmteam == local.dmteam))
{
if !(self.thinkstate==attack)
self waitthread follow_player local.dogguy
waitframe
}