I have created a custom monster for GZDoom. It acts just like a demon, except that when it is killed, it spawns 2 smaller, faster versions of itself with less health. Those monsters when killed in turn spawn even smaller and faster versions with even less health, that do not spawn anything when killed.
This monster works great in open areas. However, issues arise when it is placed in a tight space. The monsters that it spawns when it is killed do not have enough space and end up telefragging themselves.
Is there a way to prevent this from happening? Preferably the solution would not involve disabling telefragging for this monster altogether, but if that's the only way then that's fine.
Here's the code: (I wanted to use ZScript, but there simply weren't enough resources for me to learn from, so I had to settle with DECORATE.)
ACTOR SlimeDemonBig : Demon 15000
{
Obituary "%o was turned to goo by a slime demon."
States
{
Spawn:
SLI1 AB 10 A_Look
Loop
See:
SLI1 AABBCCDD 2 Fast A_Chase
Loop
Melee:
SLI1 EF 8 Fast A_FaceTarget
SLI1 G 8 Fast A_SargAttack
Goto See
Pain:
SLI1 H 2 Fast
SLI1 H 2 Fast A_Pain
Goto See
Death:
SLI1 I 8
SLI1 J 8 A_Scream
SLI1 K 4
SLI1 L 4 A_NoBlocking
SLI1 M 4
SLI1 N -1 A_DualPainAttack("SlimeDemonMedium")
Stop
Raise:
SLI1 N 5
SLI1 MLKJI 5
Goto See
}
}
ACTOR SlimeDemonMedium : Demon 15001
{
Health 100
Speed 15
Radius 20
Height 37
Obituary "%o was turned to goo by a slime demon."
States
{
Spawn:
SLI2 AB 10 A_Look
Loop
See:
SLI2 AABBCCDD 2 Fast A_Chase
Loop
Melee:
SLI2 EF 8 Fast A_FaceTarget
SLI2 G 8 Fast A_SargAttack
Goto See
Pain:
SLI2 H 2 Fast
SLI2 H 2 Fast A_Pain
Goto See
Death:
SLI2 I 8
SLI2 J 8 A_Scream
SLI2 K 4
SLI2 L 4 A_NoBlocking
SLI2 M 4
SLI2 N -1 A_DualPainAttack("SlimeDemonSmall")
Stop
Raise:
SLI2 N 5
SLI2 MLKJI 5
Goto See
}
}
ACTOR SlimeDemonSmall : Demon 15002
{
Health 50
Speed 20
Radius 10
Height 19
Obituary "%o was turned to goo by a slime demon."
States
{
Spawn:
SLI3 AB 10 A_Look
Loop
See:
SLI3 AABBCCDD 2 Fast A_Chase
Loop
Melee:
SLI3 EF 8 Fast A_FaceTarget
SLI3 G 8 Fast A_SargAttack
Goto See
Pain:
SLI3 H 2 Fast
SLI3 H 2 Fast A_Pain
Goto See
Death:
SLI3 I 8
SLI3 J 8 A_Scream
SLI3 K 4
SLI3 L 4 A_NoBlocking
SLI3 M 4
SLI3 N -1
Stop
Raise:
SLI3 N 5
SLI3 MLKJI 5
Goto See
}
}
Any help is appreciated. Thanks in advance for your response! :)
Question
Individualised
I have created a custom monster for GZDoom. It acts just like a demon, except that when it is killed, it spawns 2 smaller, faster versions of itself with less health. Those monsters when killed in turn spawn even smaller and faster versions with even less health, that do not spawn anything when killed.
This monster works great in open areas. However, issues arise when it is placed in a tight space. The monsters that it spawns when it is killed do not have enough space and end up telefragging themselves.
Is there a way to prevent this from happening? Preferably the solution would not involve disabling telefragging for this monster altogether, but if that's the only way then that's fine.
Here's the code: (I wanted to use ZScript, but there simply weren't enough resources for me to learn from, so I had to settle with DECORATE.)
ACTOR SlimeDemonBig : Demon 15000 { Obituary "%o was turned to goo by a slime demon." States { Spawn: SLI1 AB 10 A_Look Loop See: SLI1 AABBCCDD 2 Fast A_Chase Loop Melee: SLI1 EF 8 Fast A_FaceTarget SLI1 G 8 Fast A_SargAttack Goto See Pain: SLI1 H 2 Fast SLI1 H 2 Fast A_Pain Goto See Death: SLI1 I 8 SLI1 J 8 A_Scream SLI1 K 4 SLI1 L 4 A_NoBlocking SLI1 M 4 SLI1 N -1 A_DualPainAttack("SlimeDemonMedium") Stop Raise: SLI1 N 5 SLI1 MLKJI 5 Goto See } } ACTOR SlimeDemonMedium : Demon 15001 { Health 100 Speed 15 Radius 20 Height 37 Obituary "%o was turned to goo by a slime demon." States { Spawn: SLI2 AB 10 A_Look Loop See: SLI2 AABBCCDD 2 Fast A_Chase Loop Melee: SLI2 EF 8 Fast A_FaceTarget SLI2 G 8 Fast A_SargAttack Goto See Pain: SLI2 H 2 Fast SLI2 H 2 Fast A_Pain Goto See Death: SLI2 I 8 SLI2 J 8 A_Scream SLI2 K 4 SLI2 L 4 A_NoBlocking SLI2 M 4 SLI2 N -1 A_DualPainAttack("SlimeDemonSmall") Stop Raise: SLI2 N 5 SLI2 MLKJI 5 Goto See } } ACTOR SlimeDemonSmall : Demon 15002 { Health 50 Speed 20 Radius 10 Height 19 Obituary "%o was turned to goo by a slime demon." States { Spawn: SLI3 AB 10 A_Look Loop See: SLI3 AABBCCDD 2 Fast A_Chase Loop Melee: SLI3 EF 8 Fast A_FaceTarget SLI3 G 8 Fast A_SargAttack Goto See Pain: SLI3 H 2 Fast SLI3 H 2 Fast A_Pain Goto See Death: SLI3 I 8 SLI3 J 8 A_Scream SLI3 K 4 SLI3 L 4 A_NoBlocking SLI3 M 4 SLI3 N -1 Stop Raise: SLI3 N 5 SLI3 MLKJI 5 Goto See } }
Any help is appreciated. Thanks in advance for your response! :)
Edited by IndividualisedShare this post
Link to post
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.