Posted: Sun Oct 26, 2003 2:05 am
any
Code: Select all
heal local.ent:
if (isalive local.ent)
{
self.no_idle = 0
self.movedoneradius = 100
self runto local.ent
self waittill movedone
self exec global/stand.scr
if (isalive local.ent)
{
local.vec = vector_length (self.origin - local.ent.origin)
if (local.vec < 140)
{
self nodamage
self.avoidplayer = 0
// self.no_idle = 1
self upperanim pass_canteen_start
self waittill upperanimdone
local.ent heal 0.5
self playsound med_kit
self upperanim pass_canteen_end
self waittill upperanimdone
self.avoidplayer = 1
if (getcvar(alive) != "1")
self takedamage
// self.no_idle = 0
}
}
}
end
Code: Select all
healself:
if !(isAlive self)
end
local.w = randomfloat (5.0)
wait local.w
// Thinkstate killed must here applied to - Von
while ( !(self.thinkstate == "idle") && !(self.thinkstate == "killed") )
waitframe
println "canteen"
self exec global/disable_ai.scr
if !(isAlive self)
end
local.friendtype = self.friendtype
self.friendtype = -1
self holster
wait 1
if !(isAlive self)
end
self lookat NULL
self upperanim pass_canteen_drink
self waittill upperanimdone
if !(isAlive self)
end
self.health = self.maxhealth
self.friendtype = 1
self unholster
self exec global/enable_ai.scr
end
You should ask jv_map that, I don't think he's scripted that for bots though, maybe not...silversound wrote:Is it possible to have healing ai in multiplayer?