Page 1 of 1
Headshot! It almost works!
Posted: Wed May 21, 2008 6:02 am
by CaptainToenail
I'm trying to make it so that a monster can only be killed by using a headshot, this is what I've got so far:
actor TestZombie
{
spawnid 4
obituary "%o was killed by a zombieman."
health 100000000000
radius 20
height 48
mass 100
speed 1
painchance 200
seesound "grunt/sight"
attacksound "grunt/attack"
painsound "grunt/pain"
deathsound "grunt/death"
activesound "grunt/active"
dropitem "Clip" 256
MONSTER
+FLOORCLIP
states
{
Spawn:
POSS A 1 A_Look
POSS A 0 A_SpawnItemEx (HeadTarget, 0, 0, 48, 0, 0, 0, 0, 48)
loop
See:
POSS A 1 A_Chase
POSS A 0 A_SpawnItemEx (HeadTarget, 0, 0, 48, 0, 0, 0, 0, 48)
loop
Death:
POSS H 5
POSS I 5 A_Scream
POSS J 5 A_NoBlocking
POSS K 5
POSS L -1
stop
}
}
Actor HeadTarget
{
radius 8
health 1
height 8
painchance 255
mass 1000000
alpha 1
bloodcolor green
+SHOOTABLE
+NOGRAVITY
+NOTELEPORT
states
{
Spawn:
TNT1 A 10
stop
Pain:
Death:
TNT1 A 1 A_KillMaster
stop
}
}
Unfortunately it doesn't kill the zombie

You can tell your hitting the zombie's head becuase it gives off green blood, but it should kill the master which is the zombie but it doesn't

Halp!
Re: Headshot! It almost works!
Posted: Wed May 21, 2008 7:54 am
by Ghastly
I don't think A_SpawnItemEx, by default, keeps the master/child system. The 16 flag (SXF_SETMASTER) passes on that data, though.
I also discovered while working on the updated Balor that for A_KillMaster and A_KillChildren to work, the master/child has to be killable (Doesn't look like a problem, in your case).
Re: Headshot! It almost works!
Posted: Wed May 21, 2008 8:04 am
by CaptainToenail
I'm using flag 16 and flag 32
combined as needed by adding the numbers together,
it still doesn't work, even though the flag is there, that's the problem

Re: Headshot! It almost works!
Posted: Wed May 21, 2008 12:12 pm
by Nash
Not trying to nitpick, but I just noticed that you didn't enclose the HeadTarget actor with quotes in your A_SpawnItemEx functions. Is this supposed to even work in the first place?
At any rate, it seems that you've done everything correctly but the master/children information doesn't seem to exist. :/
How about trying to spawn a small projectile that kills only the actor below it? Give the zombie a custom damage type that is weak to that custom projectile.
Re: Headshot! It almost works!
Posted: Wed May 21, 2008 7:08 pm
by Risen
Are you trying to do this with DECORATE only? If not, there are some solutions available to you via ACS.
Re: Headshot! It almost works!
Posted: Thu May 22, 2008 3:10 am
by Cutmanmike
For a hack, you could have the head spawn a actor that uses A_Explode with a tiny damage radius and give it a damagetype that instantly kills the zombie but doesn't do any damage to anything else (including players)
Re: Headshot! It almost works!
Posted: Thu May 22, 2008 3:20 am
by CaptainToenail
Hmm, yes, I'll try that, hopefully if this works my "Behead the Undead" project may become a reality, here's what it's based on:
http://www.youtube.com/watch?v=HBzM1nMg4PI
(this guy sucks, he's not using the crosshair! I got just above a million points on this challenge then I got fed up

)
Edit: It works!!!!!! and no messy ACS either!
actor TestZombie
{
spawnid 4
obituary "%o was killed by a zombieman."
health 500
radius 20
height 48
mass 100
speed 1
painchance 200
seesound "grunt/sight"
attacksound "grunt/attack"
painsound "grunt/pain"
deathsound "grunt/death"
activesound "grunt/active"
dropitem "Clip" 256
damagefactor "HeadShot", 100
MONSTER
+FLOORCLIP
states
{
Spawn:
POSS A 1 A_Look
POSS A 0 A_SpawnItemEx ("HeadTarget", 0, 0, 48, 0, 0, 0, 0, 16)
loop
See:
POSS A 1 A_Chase
POSS A 0 A_SpawnItemEx ("HeadTarget", 0, 0, 48, 0, 0, 0, 0, 16)
loop
Death:
POSS H 5
POSS I 5 A_Scream
POSS J 5 A_NoBlocking
POSS K 5
POSS L -1
stop
}
}
Actor HeadTarget
{
radius 8
health 1
height 8
painchance 255
mass 1000000
alpha 1
bloodcolor green
DamageType HeadShot
+SHOOTABLE
+NOGRAVITY
+NOTELEPORT
+NODAMAGETHRUST
states
{
Spawn:
TNT1 A 10
stop
Pain:
Death:
TNT1 A 1 A_Explode(500,2,0)
stop
}
}
Actor NewDoomPlayer : DoomPlayer replaces Doomplayer
{
damagefactor "HeadShot", 0
}
Re: Headshot! It almost works!
Posted: Thu May 22, 2008 4:04 am
by Cutmanmike
Now you just have to give him some animation

Re: Headshot! It almost works!
Posted: Thu May 22, 2008 4:14 am
by CaptainToenail
Yep, already have, the obvious choice was the Blood axe zombie, I shamelessly ripped the sprites from ZBlood, and I'll add some sounds possibly from Doom 3, does anyone have any good axe swing and hit sounds, and any decapitation sounds (you'll have to use your imagination here

)
Hmm, and now I have to build the haunted mansion hall

and make the shotgun, does anyone have those old Freedoom double barrel shotgun graphics? The silver ones.
Re: Headshot! It almost works!
Posted: Thu May 22, 2008 4:25 am
by Kinsie
CaptainToenail wrote:does anyone have any good axe swing and hit sounds, and any decapitation sounds (you'll have to use your imagination here

)
Here ya go.
Re: Headshot! It almost works!
Posted: Thu May 22, 2008 4:45 am
by CaptainToenail
Perfect, thanks Kinsie
Re: Headshot! It almost works!
Posted: Tue May 27, 2008 12:14 am
by Matt
Maybe I'm a bit late, but IIRC what you've got in the OP should work without any explosions if the head target has the
+ismonster flag.