Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Mewdoom

Zdoom, here is how to make a monster resurrect himself

Recommended Posts

Hello guys, I found that trick and I would like to share it with community since I saw couple of topcis asking how to do it.

The trick consist of spawn a ghost when the monster die and that ghost, since he is spawning at the same position as the monster, he is trigger with VileChase and then ressurect the monster.

I use the soul harvester from realm 667 as example because he is already have a ghost spawning when he dying.

//Soulharvester
actor SoulHarvester 3117
{

Health 200
Radius 20
Height 56
Speed 8
PainChance 160
MONSTER
+FLOORCLIP
+NOINFIGHTING // ajouté!
SeeSound "harvester/sight"
PainSound "imp/pain"
DeathSound "harvester/death"
ActiveSound "imp/active"
MeleeSound "imp/melee"
Obituary "%o couldn't evade the soul harvester's attack."
MissileType SoulHarvesterBall
MeleeDamage 3
States
{
Spawn:
SLHV AB 10 A_Look
Loop
See:
SLHV AABBCCDD 3 A_Chase
Loop
Melee:
Missile:
SLHV EFG 4 A_FaceTarget
SLHV HIJK 5 Bright A_FaceTarget
SLHV L 8 Bright A_MissileAttack
SLHV M 10
Goto See
Pain:
SLHV N 3
SLHV N 3 A_Pain
Goto See
Death:
SLHV O 7 A_Scream
SLHV PQR 7
SLHV S 6 A_CustomMissile("SoulHarvesterGhost", 32, 0, 0)
SLHV T 5 A_Fall
SLHV UV 5
SLHV W -1
Stop
XDeath:
SLHV X 6 A_Xscream
SLHV Y 6 A_CustomMissile("SoulHarvesterGhost", 32, 0, 0)
SLHV Z 6
SLHV [ 6 A_Fall
SLHV ] 6
SLHW A -1
Stop
Raise:
SLHV WVUTSRQPO 5
Goto See
}
//$Category New Monsters

}

actor SoulHarvesterBall
{
Health 100
Radius 8
Height 6
Scale 0.4
Speed 6 //9
Damage 3 //2
+SEEKERMISSILE
PROJECTILE
+SHOOTABLE
-NOBLOCKMAP
Renderstyle ADD
SeeSound "harvester/scream"
DeathSound "imp/shotx"
Decal DoomImpScorch
States
{
Spawn:
SHBA A 0 Bright A_CustomMissile("SoulBallTrail", 0, 0, 180)
SHBA AB 2 Bright A_SeekerMissile (10,20)
Loop
Death:
SHBA CDEFGHIJKL 4 Bright
Stop
}
}

actor SoulHarvesterGhost
{
Radius 1
Height 1
Speed 0
PROJECTILE
RENDERSTYLE ADD
ALPHA 0.7
+NOCLIP
SeeSound "harvester/ghost"
States
{
Spawn:
SHGH ABCDEFG 4 A_VileChase
See:
SHGH ABCDEFG 4 A_VileChase
Death:
SHGH ABCDEFG 4 Bright
Stop
Heal:
TNT1 A 1
Goto Death
}
}

actor SoulBallTrail
{
Radius 1
Height 1
Speed 0
PROJECTILE
RENDERSTYLE ADD
ALPHA 0.5
+NOCLIP
States
{
Spawn:
Death:
SBTR H 6
SBTR ABCDEFG 4 Bright
Stop
}
}

Share this post


Link to post

There's a minor problem with this: If the monster dies on top of another corpse, the ghost may resurrect the other corpse instead. The monster also won't respawn if the area above its corpse gets physically blocked, which the player can easily cause by stepping onto the corpse and waiting before the ghost disappears (as you've coded the ghost, he doesn't loop his Spawn states, instead he goes through the See and Death states and then disappears).

Share this post


Link to post

Good point :)

its not a perfect solution, but just a workaround :)

it would be nice if we can have a flag from zdoom that can set the monster to raise himself.

Share this post


Link to post

Thing_Raise would be a better solution. Here is working example:

ACTOR ResZombieMan : ZombieMan
{
    States
    {
    Death:
        POSS H 5
        POSS I 5 A_Scream
        POSS J 5 A_NoBlocking
        POSS K 5
        POSS L Random(35, 105) // Wait between 1-3 seconds before rising
        POSS L 1 CanRaise Thing_Raise(0)
        Wait
    }
}

Share this post


Link to post

Good idea :)

(0) point itself ?

I wonder how can we set it to not raise over 2 times ? Because like that, it is like he is immortal lol

maybe if we add the code just in the death sequence and not under xdeath ?

That bring me to another question, how the death vs xdeath is calculated ? because the Soul Harvester from Realm 667 seem to always xDeath whatever the weapon a choose to kill it ....

Share this post


Link to post
Mewdoom said:

(0) point itself ?

Yes, as noted in the reference of Thing_Raise on zdoom wiki that Blue Shadow linked to.

Mewdoom said:

I wonder how can we set it to not raise over 2 times ? Because like that, it is like he is immortal lol

I'd use A_JumpIfInventory state jumps dependant on a dummy inventory item given to the monster via A_GiveInventory each time the monster dies. If his amount of this inventory exceeds a given number, A_JumpIfInventory would skip the resurrecting frame.

Mewdoom said:

That bring me to another question, how the death vs xdeath is calculated ? because the Soul Harvester from Realm 667 seem to always xDeath whatever the weapon a choose to kill it ....

If the monster has an XDeath state, and the very last hit that kills the monster drains his health below his GibHealth, the monster enters XDeath state, otherwise it enters Death state.

Share this post


Link to post

Thanks a lot, I will check that :)

very appreciated.

Once I will finish my wad I will post it for everyone :)

I think, if a monster have died xdeath, he can't be raise, I am right ?

Share this post


Link to post

If you appropriately put the Thing_Raise action into the monster's XDeath state, or if an Archvile or another healing monster approaches a gibbed corpse, the monster would be raised.

Share this post


Link to post

here is the final code :)

//Soulharvester
actor SoulHarvester 3117
{

Health 100
GibHealth 50
Radius 20
Height 56
Speed 8
PainChance 160
MONSTER
+FLOORCLIP
+NOINFIGHTING // ajouté!
SeeSound "harvester/sight"
PainSound "imp/pain"
DeathSound "harvester/death"
ActiveSound "imp/active"
MeleeSound "imp/melee"
Obituary "%o couldn't evade the soul harvester's attack."
MissileType SoulHarvesterBall
MeleeDamage 3
States
{
Spawn:
SLHV AB 10 A_Look
Loop
See:
SLHV AABBCCDD 3 A_Chase
Loop
Melee:
Missile:
SLHV EFG 4 A_FaceTarget
SLHV HIJK 5 Bright A_FaceTarget
SLHV L 8 Bright A_MissileAttack
SLHV M 10
Goto See
Pain:
SLHV N 3
SLHV N 3 A_Pain
Goto See
Death:
SLHV O 7 A_Scream
SLHV PQ 7
SLHV R 7 A_JumpIfInventory("Ammo", 1, "NoRaiseUp")
Goto RaiseUp

NoRaiseUp:
SLHV S 6 A_CustomMissile("SoulHarvesterGhost", 32, 0, 0)
SLHV T 5 A_Fall

SLHV UV 5
SLHV W -1
Stop

RaiseUp:
SLHV S 6 A_CustomMissile("SoulHarvesterGhost", 32, 0, 0)
SLHV T 5 A_Fall

SLHV U 5 A_GiveInventory("Ammo", 1, 0)
SLHV V Random(105, 175) // Wait between 3-5 seconds before rising
SLHV W 1 CanRaise Thing_Raise(0)
Wait
XDeath:
SLHV X 6 A_Xscream
SLHV Y 6 A_CustomMissile("SoulHarvesterGhost", 32, 0, 0)
SLHV Z 6
SLHV [ 6 A_Fall
SLHV ] 6
SLHW A -1
Stop
Raise:
SLHV WVUTSRQPO 5
Goto See
}
//$Category New Monsters

}

actor SoulHarvesterBall
{
Health 100
Radius 8
Height 6
Scale 0.4
Speed 6 //9
Damage 3 //2
+SEEKERMISSILE
PROJECTILE
+SHOOTABLE
-NOBLOCKMAP
Renderstyle ADD
SeeSound "harvester/scream"
DeathSound "imp/shotx"
Decal DoomImpScorch
States
{
Spawn:
SHBA A 0 Bright A_CustomMissile("SoulBallTrail", 0, 0, 180)
SHBA AB 2 Bright A_SeekerMissile (10,20)
Loop
Death:
SHBA CDEFGHIJKL 4 Bright
Stop
}
}

actor SoulHarvesterGhost
{
Radius 1
Height 1
Speed 0
PROJECTILE
RENDERSTYLE ADD
ALPHA 0.7
+NOCLIP
SeeSound "harvester/ghost"
States
{
Spawn:
Death:
SHGH ABCDEFG 4 Bright
Stop
}
}

actor SoulBallTrail
{
Radius 1
Height 1
Speed 0
PROJECTILE
RENDERSTYLE ADD
ALPHA 0.5
+NOCLIP
States
{
Spawn:
Death:
SBTR H 6
SBTR ABCDEFG 4 Bright
Stop
}
}

Share this post


Link to post

Why so complicated? If you want to let a monster raise itself, simply call 'Thing_Raise(0)' somewhere in its death state. That avoids all the problems with A_VileChase.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×