Some one help me with this
Posted: Sat Apr 26, 2003 8:05 pm
Hi!!
I really need help...
you see i am tryin to get a german hittin an allied soldier, who is sittin on a chair (bein interragated) like in mission 1|2a.
I think it is somethin wrong with my script, or somethin i missed out to put in the map...
The ALLIED SOLDIER WORKS FINE, he will get hit and stand up when i get close and everythin... BUT it is the German that doesn't do nothin...
HERE IS MY SCRIPT..
chairstart:
if (isalive level.friendly5)
level.friendly5 nodamage
local.o = $interchair gettagposition "tag_oss"
level.friendly5.origin = local.o
level.friendly5.angles = $interchair.angles
level.friendly5 exec global/disable_ai.scr
level.friendly5 solid
level.friendly5 waitexec anim/smoking.scr::SmokeRemoveCigarette
local.o = $interchair gettagposition "tag_german"
local.a = $interchair gettagangles "tag_german"
spawn human/German_afrika_private "targetname" "chairenemy"
$chairenemy.angles = $interchair.angles
$chairenemy exec global/disable_ai.scr
$chairenemy threatbias ignoreme
local.a2 = $chairenemy.angles
local.a2[1] = local.a2[1] + 180
$chairenemy.origin = local.o
$chairenemy.angles = local.a2
level.friendly5 gun "none"
$chairenemy gun "Mauser KAR 98K"
$chairenemy holster
local.last = 1
local.randnum = 1
$chairenemy anim_scripted "German_hit_idle"
// level.friendly5 delete
thread chairanim local.o
local.thread = parm.previousthread
thread chairhealth local.thread
end
chairanim local.o:
$chairenemy.no_idle = 1
level.friendly5.no_idle = 1
while (1==1)
{
$chairenemy.origin = local.o
if (randomint(100) > 85)
{
$chairenemy anim_scripted "German_hit_idle"
waitframe
level.friendly5 anim_scripted "OSS_hit_idle"
wait 0.9
// level.friendly5 waittill animdone
}
else
{
while (local.randnum == local.last)
local.randnum = randomint(3) + 1
local.last = local.randnum
$chairenemy anim_scripted ("German_hit_" + local.randnum)
waitframe
level.friendly5 anim_scripted ("OSS_hit_" + local.randnum)
wait 0.25
level.friendly5 waittill animdone
}
}
end
chairsolid:
while ((isalive level.friendly5) && (vector_length (self.origin - level.friendly5.origin) < 100))
wait 0.3
while (vector_length (self.origin - $player.origin) < 100)
wait 0.3
self solid
end
POW_damage:
level.flags[POW_damage] = 1
self delete
end
deathmessage:
self waittill death
iprintlnbold "Private Jury has been killed in action."
end
chairhealth local.thread:
local.health = $chairenemy.health
while ((level.flags[POW_damage] == 0) && ($chairenemy.health == local.health) && (vector_length ($player.origin - $interchair.origin) > 200))
waitframe
local.thread delete
$chairenemy anim stop
level.friendly5 anim stop
$chairenemy unholster
$chairenemy lookat $player
$chairenemy turnto $player
$chairenemy threatbias 1000
$chairenemy exec global/enable_ai.scr
while ((isalive $chairenemy) || (isalive $pow_guard))
{
level.friendly5 anim_scripted "OSS_hit_idle"
level.friendly5 waittill animdone
}
local.dist = 80
$interchair notsolid
// level.friendly5 notsolid
while (vector_length (level.friendly3.origin - $player.origin) < local.dist)
wait 0.4
level.friendly5 anim_noclip oss_getup
level.friendly5 waittill animdone
level.friendly5 lookat $player
/*
while (vector_length (level.friendly3.origin - $player.origin) < local.dist)
wait 0.4
level.friendly5 waitthread global/reach.scr::reach $chairnode
// level.friendly5 runto $chairnode
// level.friendly5 waittill movedone
*/
// level.friendly5 solid
// $chairclip delete
// $interchair solid
level.flags[hostage] = 1
// level.friendly5 american
level.friendly5 thread deathmessage
level.friendly5.friendtype = 1
level.friendly5.olddestination = $player
level.friendly5.destination = $player
level.friendly5.turndoneerror = 5
level.friendly5 turnto $player
level.friendly5 lookat $player
level.friendly5 waittill turndone
level.friendly5 say dfr_M1L2_thankyou
level.friendly5 waittill saydone
while (vector_length (level.friendly5.origin - $player.origin) < local.dist)
wait 0.4
level.friendly5 thread lookpastlow $pow_gun
wait 0.25
level.friendly5 turnto $pow_gun
level.friendly5 runto $pow_node
$interchair thread chairsolid
level.friendly5 waittill movedone
level.friendly5 turnto NULL
level.friendly5 upperanim pickup_obj
wait 0.5
level.friendly5 turnto $player
$pow_gun hide
println "01"
level.friendly5 gun "Mauser KAR 98D Sniper"
level.friendly5 playsound kar98sniper_snd_pickup
println "02"
level.friendly5 threatbias 0
println "03"
level.friendly5 exec global/enable_ai.scr
println "04"
level.friendly5 thread global/friendly.scr::friendlythink
level.friendly5 takedamage
// level.friendly5 item weapons/colt45.tik
println "05"
println "06"
level.friendly5.distance = 150
println "07"
// level.friendly5.leash = 150
println "08"
level.friendly5.no_idle = 0
// level.friendly5 tether $player
wait 2
if (isalive level.friendly5)
level.friendly5 lookat $player
println "09"
// thread lockdown 565
thread PUREfillused 565
println ("friendtype is " + level.friendly5.friendtype)
end
I want this to work for my map! (this script was takin from 1|2a script)
I really need help...
you see i am tryin to get a german hittin an allied soldier, who is sittin on a chair (bein interragated) like in mission 1|2a.
I think it is somethin wrong with my script, or somethin i missed out to put in the map...
The ALLIED SOLDIER WORKS FINE, he will get hit and stand up when i get close and everythin... BUT it is the German that doesn't do nothin...
HERE IS MY SCRIPT..
chairstart:
if (isalive level.friendly5)
level.friendly5 nodamage
local.o = $interchair gettagposition "tag_oss"
level.friendly5.origin = local.o
level.friendly5.angles = $interchair.angles
level.friendly5 exec global/disable_ai.scr
level.friendly5 solid
level.friendly5 waitexec anim/smoking.scr::SmokeRemoveCigarette
local.o = $interchair gettagposition "tag_german"
local.a = $interchair gettagangles "tag_german"
spawn human/German_afrika_private "targetname" "chairenemy"
$chairenemy.angles = $interchair.angles
$chairenemy exec global/disable_ai.scr
$chairenemy threatbias ignoreme
local.a2 = $chairenemy.angles
local.a2[1] = local.a2[1] + 180
$chairenemy.origin = local.o
$chairenemy.angles = local.a2
level.friendly5 gun "none"
$chairenemy gun "Mauser KAR 98K"
$chairenemy holster
local.last = 1
local.randnum = 1
$chairenemy anim_scripted "German_hit_idle"
// level.friendly5 delete
thread chairanim local.o
local.thread = parm.previousthread
thread chairhealth local.thread
end
chairanim local.o:
$chairenemy.no_idle = 1
level.friendly5.no_idle = 1
while (1==1)
{
$chairenemy.origin = local.o
if (randomint(100) > 85)
{
$chairenemy anim_scripted "German_hit_idle"
waitframe
level.friendly5 anim_scripted "OSS_hit_idle"
wait 0.9
// level.friendly5 waittill animdone
}
else
{
while (local.randnum == local.last)
local.randnum = randomint(3) + 1
local.last = local.randnum
$chairenemy anim_scripted ("German_hit_" + local.randnum)
waitframe
level.friendly5 anim_scripted ("OSS_hit_" + local.randnum)
wait 0.25
level.friendly5 waittill animdone
}
}
end
chairsolid:
while ((isalive level.friendly5) && (vector_length (self.origin - level.friendly5.origin) < 100))
wait 0.3
while (vector_length (self.origin - $player.origin) < 100)
wait 0.3
self solid
end
POW_damage:
level.flags[POW_damage] = 1
self delete
end
deathmessage:
self waittill death
iprintlnbold "Private Jury has been killed in action."
end
chairhealth local.thread:
local.health = $chairenemy.health
while ((level.flags[POW_damage] == 0) && ($chairenemy.health == local.health) && (vector_length ($player.origin - $interchair.origin) > 200))
waitframe
local.thread delete
$chairenemy anim stop
level.friendly5 anim stop
$chairenemy unholster
$chairenemy lookat $player
$chairenemy turnto $player
$chairenemy threatbias 1000
$chairenemy exec global/enable_ai.scr
while ((isalive $chairenemy) || (isalive $pow_guard))
{
level.friendly5 anim_scripted "OSS_hit_idle"
level.friendly5 waittill animdone
}
local.dist = 80
$interchair notsolid
// level.friendly5 notsolid
while (vector_length (level.friendly3.origin - $player.origin) < local.dist)
wait 0.4
level.friendly5 anim_noclip oss_getup
level.friendly5 waittill animdone
level.friendly5 lookat $player
/*
while (vector_length (level.friendly3.origin - $player.origin) < local.dist)
wait 0.4
level.friendly5 waitthread global/reach.scr::reach $chairnode
// level.friendly5 runto $chairnode
// level.friendly5 waittill movedone
*/
// level.friendly5 solid
// $chairclip delete
// $interchair solid
level.flags[hostage] = 1
// level.friendly5 american
level.friendly5 thread deathmessage
level.friendly5.friendtype = 1
level.friendly5.olddestination = $player
level.friendly5.destination = $player
level.friendly5.turndoneerror = 5
level.friendly5 turnto $player
level.friendly5 lookat $player
level.friendly5 waittill turndone
level.friendly5 say dfr_M1L2_thankyou
level.friendly5 waittill saydone
while (vector_length (level.friendly5.origin - $player.origin) < local.dist)
wait 0.4
level.friendly5 thread lookpastlow $pow_gun
wait 0.25
level.friendly5 turnto $pow_gun
level.friendly5 runto $pow_node
$interchair thread chairsolid
level.friendly5 waittill movedone
level.friendly5 turnto NULL
level.friendly5 upperanim pickup_obj
wait 0.5
level.friendly5 turnto $player
$pow_gun hide
println "01"
level.friendly5 gun "Mauser KAR 98D Sniper"
level.friendly5 playsound kar98sniper_snd_pickup
println "02"
level.friendly5 threatbias 0
println "03"
level.friendly5 exec global/enable_ai.scr
println "04"
level.friendly5 thread global/friendly.scr::friendlythink
level.friendly5 takedamage
// level.friendly5 item weapons/colt45.tik
println "05"
println "06"
level.friendly5.distance = 150
println "07"
// level.friendly5.leash = 150
println "08"
level.friendly5.no_idle = 0
// level.friendly5 tether $player
wait 2
if (isalive level.friendly5)
level.friendly5 lookat $player
println "09"
// thread lockdown 565
thread PUREfillused 565
println ("friendtype is " + level.friendly5.friendtype)
end
I want this to work for my map! (this script was takin from 1|2a script)