Hey bdbodger help
Posted: Tue Nov 18, 2003 6:58 pm
I made a script which uses most of the dog handler commands, I used your dogs. I added some animations to your dog script and the work good.
Now I run the script and it looks good. The dog and handler walk as if the dog is pulling on the leash and the handler is hanging on. It looks real cool! (I tried making a leash but coulden't. I coulden't get the leash to attach to the dog or handler. But thats another problem) The thing I need help with is when I kill the handler the dog goes into alert (the rest of the commands stop and thats good!) But when I kill the dog, the handler continues with the animations like the dog is still alive.(looks dumb. He releases a dog thats not there and hits a dog thats not there.)How can I make it so when the dog gets killed, the handler stops the commands and goes alert? Here' my script:
Thanks for your help!
Now I run the script and it looks good. The dog and handler walk as if the dog is pulling on the leash and the handler is hanging on. It looks real cool! (I tried making a leash but coulden't. I coulden't get the leash to attach to the dog or handler. But thats another problem) The thing I need help with is when I kill the handler the dog goes into alert (the rest of the commands stop and thats good!) But when I kill the dog, the handler continues with the animations like the dog is still alive.(looks dumb. He releases a dog thats not there and hits a dog thats not there.)How can I make it so when the dog gets killed, the handler stops the commands and goes alert? Here' my script:
Code: Select all
$para item weapons/FG42.tik
$para unholster weapon
wait 20
$para thread para_follow $dog
$dog turnto $wp1
while(vector_length ($dog.origin - $wp1.origin) > 270)
{
$dog anim "unarmed__walk_leash_forward"
$dog waittill flaggedanimdone
}
if(isAlive $dog)
{
$para thread para_follow $dog
}
else
{
level.stoppara = 0
}
wait 2
level.stoppara = 0
$dog anim dog_leash_stop
$para anim handler_stop
wait .2
$dog turnto wp2
$para turnto wp2
wait 2
$para anim handler_release
wait .5
$dog runto wp2
wait 5
$para runto wp2
$para waittill movedone
$para lookat $dog
$para turnto $dog
wait .5
$para anim handler_discipline
$dog anim dog_discipline
wait 2
$para turnto $wp3
$para lookat NULL
wait 2
$dog runto $wp3
$para runto $wp3
end
para_follow local.dog:
println "para thread active "
self.destination = local.dog
self.distance = 5
self.waittime=1
self.friendrange = 0
self.runanimrate=1.35
level.stoppara =1
while ((isalive self)&&( isalive local.dog )&&(level.stoppara == 1 ))
{
if !(self.thinkstate==attack)
self waitthread follow_player local.dog
waitframe
}
println "Para 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 anim handler_walk self.destination.origin
local.handler_stop = 0
self waittill movedone
if !(self.destination)
self.destination = null
if (vector_length (self.destination.origin - self.origin) < self.distance + self.friendrange)
{
self anim handler_stop
}
}
end
////////////////////////////////////////////////////////////
movedone:
self.movedone = 0
self waittill movedone
self.movedone = parm.movedone
end
////////////////////////////////////////////////////////Thanks for your help!