K_Doom Posted February 22, 2022 (edited) Hi guys, I believe you've seen this little guy here 👇 ᴹᵃᵘˡᵉʳ ᴰᵉᵐᵒⁿ Well, he has an interesting way of attacking: jumps on opponents using the A_SkullAttack function. The problem is that this function causes infighting both between the other Mauler Demons and the normal Demons. And so they fight more with each other than with the player haha I've tried, but no flag that prevents infighting solves this problem, because they only work with projectiles. I wanted to know what would be the best way around this. Any suggestion? Edited February 22, 2022 by K_Doom edit 0 Quote Share this post Link to post
Dark Pulse Posted February 22, 2022 (edited) By default, infighting is something where missile attacks do not harm members of the same species, but melee attacks are considered universal. Two Barons can't harm each other with their shots, but you can definitely make them claw each other to death, via abusing barrels for example. Since you mention using A_SkullAttack for those custom demons, I'm going to presume you're using some form of DECORATE or ZScript for them. But that's also what makes it tricky: DONTHARMSPECIES and DONTHARMCLASS only applies to missiles. NORADIUSDAMAGE is useless because this isn't an explosion. NOINFIGHTING will prevent the infighting, but the monster will still suffer damage if it's hit by a charging Mauler Demon. (And defining it on the Mauler Demon would only mean the Mauler Demon wouldn't retaliate - other monsters could/would retaliate if hit by it.) Basically, the system is way less flexible for melee attacks as opposed to projectile ones, and a lost soul is, technically, doing a charging melee attack. This would be easy to make work as a projectile, but melee is way, way harder. Edited February 22, 2022 by Dark Pulse 1 Quote Share this post Link to post
Kan3 Posted February 22, 2022 I'd suggest you to try giving them a DamageType and then giving them immunity to that type with DamageFactor. This way they shouldn't be able to harm each other, since A_SkullAttack use the damage property set on the monster itself and (hopefully) this way they won't infight. 1 Quote Share this post Link to post
horselessheadsman Posted February 23, 2022 I myself tried in the past to deal with this issue the same way, but even a paired DamageType and DamageFactor didn't work, unfortunately. When hitting each other with A_SkullAttack they seemed to harm each other anyway. Ultimately I decided to simply lower the range of that it would lunge at, so there's less chance another monster is between the it and the player. 1 Quote Share this post Link to post
K_Doom Posted February 23, 2022 (edited) 20 hours ago, Dark Pulse said: By default, infighting is something where missile attacks do not harm members of the same species, but melee attacks are considered universal. Two Barons can't harm each other with their shots, but you can definitely make them claw each other to death, via abusing barrels for example. Since you mention using A_SkullAttack for those custom demons, I'm going to presume you're using some form of DECORATE or ZScript for them. But that's also what makes it tricky: DONTHARMSPECIES and DONTHARMCLASS only applies to missiles. NORADIUSDAMAGE is useless because this isn't an explosion. NOINFIGHTING will prevent the infighting, but the monster will still suffer damage if it's hit by a charging Mauler Demon. (And defining it on the Mauler Demon would only mean the Mauler Demon wouldn't retaliate - other monsters could/would retaliate if hit by it.) Basically, the system is way less flexible for melee attacks as opposed to projectile ones, and a lost soul is, technically, doing a charging melee attack. This would be easy to make work as a projectile, but melee is way, way harder. @Dark Pulse Yes, I noticed this issue when the A_SkullAttack (Lost Souls) class monsters themselves got hurt. But I thought if knew what causes this infighting factor in Lost Souls, could solve the same problem with Mauler Demons. But when accessing this function on the ZDoom wiki I didn't come to any conclusion, basically A_SkullAttack is A_SkullAttack and that's all (???). It's not like this function is like A_PosAttack, where it's equivalent to A_CustomBullets with parameters (22.5, 0, 1, random(1,5)*3, "BulletPuff", 0, CBAF_NORANDOM), it was something like this I expected to find. 12 hours ago, Kan3 said: I'd suggest you to try giving them a DamageType and then giving them immunity to that type with DamageFactor. This way they shouldn't be able to harm each other, since A_SkullAttack use the damage property set on the monster itself and (hopefully) this way they won't infight. @Kan3 I thought about solving it like that too, but since the attack is about the Mauler Demon advancing on the player, i.e. changing from location P1 to P2 (old position, current position) while dealing damage, I find it much more complicated to define this than it would be with a projectile. So I don't know how to do it now. 2 hours ago, horselessheadsman said: I myself tried in the past to deal with this issue the same way, but even a paired DamageType and DamageFactor didn't work, unfortunately. When hitting each other with A_SkullAttack they seemed to harm each other anyway. Ultimately I decided to simply lower the range of that it would lunge at, so there's less chance another monster is between the it and the player. @horselessheadsman I didn't want to have to shorten the jump distance. If I do that, for balance reasons I will have to increase the Mauler Demon's speed a lot (Turbo Mauler hehe). And since I don't want to do that, I'll still try to solve this problem. The demon from Brutal Doom v21 also jumps, and in an even more plastic way than simply using A_SkullAttack on a ground monster. However, when opening his code I realized that there is a proportion there beyond my understanding of complex code, this confused me a lot because I still consider myself a beginner haha Edited February 23, 2022 by K_Doom edit 0 Quote Share this post Link to post
Dark Pulse Posted February 23, 2022 (edited) 4 hours ago, K_Doom said: @Dark Pulse Yes, I noticed this issue when the A_SkullAttack (Lost Souls) class monsters themselves got hurt. But I thought if knew what causes this infighting factor in Lost Souls, could solve the same problem with Mauler Demons. But when accessing this function on the ZDoom wiki I didn't come to any conclusion, basically A_SkullAttack is A_SkullAttack and that's all (???). It's not like this function is like A_PosAttack, where it's equivalent to A_CustomBullets with parameters (22.5, 0, 1, random(1,5)*3, "BulletPuff", 0, CBAF_NORANDOM), it was something like this I expected to find. Essentially, A_SkullAttack thrusts the actor forward at a fixed velocity (20 units per tic). That's literally all it does. Lost Souls are actually tricky, because unlike any other monster, when it bumps into anything (a player, a monster, an item...), that's when it deals 3*(1-8) damage. In this sense, it behaves more like a projectile where the damage is "inherent" to it. Obviously if the Thing can be damaged, it's damaged; if it can't, then it doesn't take it, but it will stop the Lost Soul charge. What "causes" the infighting is that generally speaking, a monster will retaliate against whatever damaged it, assuming that the monster does not have code to prevent the infighting (i.e; the Arch-vile). Barrels are a special case: The monster will instead target whoever destroyed the barrel. This is why the two Barons above fought, and also why in earlier versions of Doom it was possible to get a monster to kill itself if you got it to hurt a barrel but not kill it, then got it to blow up the barrel to hurt it. (A special check was added in later versions of the game to fix this.) Lost Souls are an extra complication: If they are hurt by a monster, they have a guaranteed pain chance, so they will retaliate, but then they resume going after the player (unless hurt by a monster again) due to a quirk in the code. It should also be noted the Lost Soul's damage is actually less than the regular Demon can do - that's 4*(1-10) damage. Edited February 23, 2022 by Dark Pulse 1 Quote Share this post Link to post
K_Doom Posted February 24, 2022 22 hours ago, Dark Pulse said: Essentially, A_SkullAttack thrusts the actor forward at a fixed velocity (20 units per tic). That's literally all it does. Lost Souls are actually tricky, because unlike any other monster, when it bumps into anything (a player, a monster, an item...), that's when it deals 3*(1-8) damage. In this sense, it behaves more like a projectile where the damage is "inherent" to it. Obviously if the Thing can be damaged, it's damaged; if it can't, then it doesn't take it, but it will stop the Lost Soul charge. What "causes" the infighting is that generally speaking, a monster will retaliate against whatever damaged it, assuming that the monster does not have code to prevent the infighting (i.e; the Arch-vile). Barrels are a special case: The monster will instead target whoever destroyed the barrel. This is why the two Barons above fought, and also why in earlier versions of Doom it was possible to get a monster to kill itself if you got it to hurt a barrel but not kill it, then got it to blow up the barrel to hurt it. (A special check was added in later versions of the game to fix this.) Lost Souls are an extra complication: If they are hurt by a monster, they have a guaranteed pain chance, so they will retaliate, but then they resume going after the player (unless hurt by a monster again) due to a quirk in the code. It should also be noted the Lost Soul's damage is actually less than the regular Demon can do - that's 4*(1-10) damage. Yes, in the end, I imagine I'll only be able to solve this the way I want if I turn this jump attack into an A_CustomMissile. The problem is how... 0 Quote Share this post Link to post
K_Doom Posted February 24, 2022 Well guys, it looks like now I've really encountered a challenge. I'll post it here if I get it resolved. Thanks for listening. 0 Quote Share this post Link to post
Vermil Posted February 24, 2022 Maybe you could have the charge itself do no damage ala Heretic's Gargoyle? 1 Quote Share this post Link to post
K_Doom Posted February 25, 2022 34 minutes ago, Vermil said: Maybe you could have the charge itself do no damage ala Heretic's Gargoyle? Wow, that sounds interesting, I don't know anything about this game. Does this work in Doom's decorate? 0 Quote Share this post Link to post
Vermil Posted February 25, 2022 I'm not familiar with ZDoom modding, but it should just be a matter of setting the Mauler demons damage field to 0? 0 Quote Share this post Link to post
K_Doom Posted February 25, 2022 12 hours ago, Vermil said: I'm not familiar with ZDoom modding, but it should just be a matter of setting the Mauler demons damage field to 0? Gargoyle's attack form (hereticimp) implies the same A_SkullAttack function, so it's no use. It is impossible to define the damage in this function, which is the same function used in Mauler's attack. 0 Quote Share this post Link to post
Vermil Posted February 26, 2022 (edited) With A_SkullAttack I believe you define the damage in the mobj definition itself. Zero it and A_SkullAttack should deal no damage, but will also cause the demon not to infight. Default { Health 150; PainChance 180; Speed 10; Radius 30; Height 56; Mass 400; Damage 2; //Horns = pain. I say no more SeeSound "demon/sight"; AttackSound "demon/melee"; PainSound "demon/pain"; DeathSound "demon/death"; ActiveSound "demon/active"; Obituary "%o was gored by a Mauler Demon."; HitObituary "%o was mauled by a Mauler Demon"; Monster; +FLOORCLIP } Edited February 26, 2022 by Vermil 1 Quote Share this post Link to post
K_Doom Posted February 27, 2022 22 hours ago, Vermil said: With A_SkullAttack I believe you define the damage in the mobj definition itself. Zero it and A_SkullAttack should deal no damage, but will also cause the demon not to infight. Default { Health 150; PainChance 180; Speed 10; Radius 30; Height 56; Mass 400; Damage 2; //Horns = pain. I say no more SeeSound "demon/sight"; AttackSound "demon/melee"; PainSound "demon/pain"; DeathSound "demon/death"; ActiveSound "demon/active"; Obituary "%o was gored by a Mauler Demon."; HitObituary "%o was mauled by a Mauler Demon"; Monster; +FLOORCLIP } Yes, I'm aware of that. I created a custom melee attack (A_CustomMeleeAttack) and set a specific damage on it, also made a new Pinky and set the damage factor to 0 in reference to the new damage created [bite]. But it still didn't work. But you gave me an idea, I'll let you know if it works. 0 Quote Share this post Link to post
Kan3 Posted February 27, 2022 4 hours ago, K_Doom said: Yes, I'm aware of that. But you just said: On 2/25/2022 at 9:40 PM, K_Doom said: It is impossible to define the damage in this function x) Anyhow, it was easier than I thought (I actually use this in 2 of my monsters, dumb brain). To erase the damage dealt by A_SkullAttack you just have to delete the damage property from the demon code (like they already told you, but don't set it to 0, delete the line directly). So, the "dash attack" won't deal anymore damage to anyone and, so, no infighting (I just tested it, it works). Anyhow, if you want to have these demons to deal damage with their "dash" anyway, the only way is to add a new state with a A_CustomMeleeAttack. You set a Goto "YourNewState" after the Missile state and you're done (you could add a A_JumpIfCloser before attacking, so that they won't attack the air if they miss you, even if it's hard they're going to miss, I see that they're quite hard to avoid). The issue with this approach though is the timing, cause if you set the ticks a bit off, they won't probably be able to get you with their attack. You could try adding multiple A_CustomMeleeAttack in succession and with very low damage to increase the chance, but possibly you won't have any issue at all cause of the low distance they need to dash to you and their speed. You could even try with a A_SpawnProjectile, instead of a melee attack: an invisible projectile that the demon will shoot immediately after the dash and that will have the same speed of the demon dashing (probably the best solution). 1 Quote Share this post Link to post
K_Doom Posted February 27, 2022 10 hours ago, Kan3 said: But you just said: x) Anyhow, it was easier than I thought (I actually use this in 2 of my monsters, dumb brain). To erase the damage dealt by A_SkullAttack you just have to delete the damage property from the demon code (like they already told you, but don't set it to 0, delete the line directly). So, the "dash attack" won't deal anymore damage to anyone and, so, no infighting (I just tested it, it works). Anyhow, if you want to have these demons to deal damage with their "dash" anyway, the only way is to add a new state with a A_CustomMeleeAttack. You set a Goto "YourNewState" after the Missile state and you're done (you could add a A_JumpIfCloser before attacking, so that they won't attack the air if they miss you, even if it's hard they're going to miss, I see that they're quite hard to avoid). The issue with this approach though is the timing, cause if you set the ticks a bit off, they won't probably be able to get you with their attack. You could try adding multiple A_CustomMeleeAttack in succession and with very low damage to increase the chance, but possibly you won't have any issue at all cause of the low distance they need to dash to you and their speed. You could even try with a A_SpawnProjectile, instead of a melee attack: an invisible projectile that the demon will shoot immediately after the dash and that will have the same speed of the demon dashing (probably the best solution). I'll try to see which shape fits best the way I envision it. I will reply here if I have any questions. Thanks a lot for the tips. 1 Quote Share this post Link to post
K_Doom Posted February 28, 2022 (edited) 19 hours ago, Kan3 said: But you just said: x) Anyhow, it was easier than I thought (I actually use this in 2 of my monsters, dumb brain). To erase the damage dealt by A_SkullAttack you just have to delete the damage property from the demon code (like they already told you, but don't set it to 0, delete the line directly). So, the "dash attack" won't deal anymore damage to anyone and, so, no infighting (I just tested it, it works). Anyhow, if you want to have these demons to deal damage with their "dash" anyway, the only way is to add a new state with a A_CustomMeleeAttack. You set a Goto "YourNewState" after the Missile state and you're done (you could add a A_JumpIfCloser before attacking, so that they won't attack the air if they miss you, even if it's hard they're going to miss, I see that they're quite hard to avoid). The issue with this approach though is the timing, cause if you set the ticks a bit off, they won't probably be able to get you with their attack. You could try adding multiple A_CustomMeleeAttack in succession and with very low damage to increase the chance, but possibly you won't have any issue at all cause of the low distance they need to dash to you and their speed. You could even try with a A_SpawnProjectile, instead of a melee attack: an invisible projectile that the demon will shoot immediately after the dash and that will have the same speed of the demon dashing (probably the best solution). Hi, I did as recommended in the last tip (create an invisible projectile) and it really solved the infighting problem, but for some reason it was an inconsistent way for Mauler Demon to deal damage as it sometimes hit and sometimes it didn't. Even when I [player] was in front of the attack. So I decided to decrease A_SkullAttack's tics so that it would run the dash faster and so the invisible projectile could be more effective. But he turned into a killing machine lol As the A_JumpIfCloser line works every time he's close, when he gets close to the player he executes it thousands of times looking like a machine gun, killing the player very fast even with little damage. Now I would like him to make this jump with a certain time interval, like the demons of brutal destruction projects (more specifically v21), I don't know if you've played it. Could you show me your monster codes so I can get a better idea? I can send mine too if you want to take a look. Edited February 28, 2022 by K_Doom edit 0 Quote Share this post Link to post
Kan3 Posted February 28, 2022 1 hour ago, K_Doom said: So I decided to decrease A_SkullAttack's tics My bad, the projectile should be shoot right before the A_SkullAttack, something like this: Spoiler Missile: MAUD E 0 A_Jumpifcloser(224, 2) Goto See MAUD E 4 A_FaceTarget TNT1 A 0 A_SpawnProjectile("youmissile", 24.0) MAUD F 10 A_SkullAttack MAUD G 5 A_Gravity Goto See or like this: Spoiler Missile: MAUD E 0 A_Jumpifcloser(224, 2) Goto See MAUD E 4 A_FaceTarget MAUD F 10 { A_SpawnProjectile("youmissile", 24.0); A_SkullAttack; } MAUD G 5 A_Gravity Goto See (remember to give the projectile a low lifespan or it will travel indefinitely forward with the chance of hitting something). 1 hour ago, K_Doom said: As the A_JumpIfCloser line works every time he's close, when he gets close to the player he executes it thousands of times looking like a machine gun, killing the player very fast even with little damage. Weird, in close quarter they should use their Melee state. What return state did you set after the Dash? 2 hours ago, K_Doom said: Now I would like him to make this jump with a certain time interval, like the demons of brutal destruction projects (more specifically v21), I don't know if you've played it. Unfortunately not, but, if I've understood correctly, you just have to add some frame after the dash, to make it not jump at you continuously (with a A_JumpIfCloser pointing to the melee state right before the "wait", or it won't try to bite you after it jumped at you). 2 hours ago, K_Doom said: Could you show me your monster codes so I can get a better idea? I can send mine too if you want to take a look. Yeah sure, but mine is a bit different cause I made use of its normal melee state directly after the dash, cause it doesn't have a default melee state. Spoiler Dash: TNT1 A 0 A_Jump(96, 4) DKEL C 2 A_FaceTarget DKEL G 6 Bright A_SkullAttack(28) Goto Melee Missile: TNT1 A 0 A_JumpIfCloser(400, "Dash") TNT1 A 0 A_Jump(156, "MinionSpawn", "MinionRaise") DKEL C 5 A_FaceTarget DKEL J 5 Bright A_FaceTarget DKEL J 10 Bright A_CustomMissile("DeathTracer", 136, -56 ,0,0,0) Goto See Melee: DKEL GH A_FaceTarget DKEL I 4 A_CustomMeleeAttack(random(1, 10) * 12, "death/slash", "death/miss", "Ice") DKEL C 8 { A_FaceTarget; A_Stop; } TNT1 A 0 A_Jump(96, "DashBack") Goto See (it can be polished, but it does the job. Yeah I'd like to see that code 1 Quote Share this post Link to post
K_Doom Posted March 1, 2022 15 hours ago, Kan3 said: My bad, the projectile should be shoot right before the A_SkullAttack, something like this: Reveal hidden contents Missile: MAUD E 0 A_Jumpifcloser(224, 2) Goto See MAUD E 4 A_FaceTarget TNT1 A 0 A_SpawnProjectile("youmissile", 24.0) MAUD F 10 A_SkullAttack MAUD G 5 A_Gravity Goto See or like this: Reveal hidden contents Missile: MAUD E 0 A_Jumpifcloser(224, 2) Goto See MAUD E 4 A_FaceTarget MAUD F 10 { A_SpawnProjectile("youmissile", 24.0); A_SkullAttack; } MAUD G 5 A_Gravity Goto See (remember to give the projectile a low lifespan or it will travel indefinitely forward with the chance of hitting something). Weird, in close quarter they should use their Melee state. What return state did you set after the Dash? Unfortunately not, but, if I've understood correctly, you just have to add some frame after the dash, to make it not jump at you continuously (with a A_JumpIfCloser pointing to the melee state right before the "wait", or it won't try to bite you after it jumped at you). Yeah sure, but mine is a bit different cause I made use of its normal melee state directly after the dash, cause it doesn't have a default melee state. Reveal hidden contents Dash: TNT1 A 0 A_Jump(96, 4) DKEL C 2 A_FaceTarget DKEL G 6 Bright A_SkullAttack(28) Goto Melee Missile: TNT1 A 0 A_JumpIfCloser(400, "Dash") TNT1 A 0 A_Jump(156, "MinionSpawn", "MinionRaise") DKEL C 5 A_FaceTarget DKEL J 5 Bright A_FaceTarget DKEL J 10 Bright A_CustomMissile("DeathTracer", 136, -56 ,0,0,0) Goto See Melee: DKEL GH A_FaceTarget DKEL I 4 A_CustomMeleeAttack(random(1, 10) * 12, "death/slash", "death/miss", "Ice") DKEL C 8 { A_FaceTarget; A_Stop; } TNT1 A 0 A_Jump(96, "DashBack") Goto See (it can be polished, but it does the job. Yeah I'd like to see that code When I referred to the demon from brutal doom v21 it was this one 👇Well of Souls - Sergeant_Mark_IV's BRUTAL DOOM version 21 2022-02-28 20-37-28.rar The Mauler Demon I edited is here if you want to take a look and understand how it works. MaulerDemon.rar Meanwhile, I'm trying to balance this killing machine, and following your tips haha 0 Quote Share this post Link to post
Kan3 Posted March 1, 2022 8 hours ago, K_Doom said: The Mauler Demon I edited is here if you want to take a look and understand how it works. MaulerDemon.rar Ok, I've took a look at it and made a few changes cause there was unnecessary stuff. Here's the code if you want to take a look at: Spoiler ACTOR MaulerDemon : Demon 13000 { //$Category Monsters Health 300 PainChance 90 Speed 15 Radius 34 Height 56 Mass 450 Monster Scale 1.5 +FLOORCLIP +DONTHURTSPECIES Obituary "%o foi atravessado pelos chifres do demonio estraçalhador." HitObituary "%o foi brutalizado pelo demonio estraçalhador" tag "MaulerDemon" Species "Demon" Scale 1.20 States { Spawn: MAUD AB 10 A_Look Loop See: MAUD AABBCCDD 2 A_Chase Loop Melee: MAUD EF 4 A_FaceTarget MAUD G 6 A_CustomMeleeAttack(random (10, 15)*4, "demon/melee", "demon/melee") Goto See Missile: MAUD E 0 A_Jumpifcloser(220, 2) Goto See MAUD E 8 A_FaceTarget TNT1 A 0 A_CustomMissile("DemonAttack",30,0,0) MAUD F 10 A_SkullAttack MAUD G 5 A_Gravity MAUD E 0 A_Jumpifcloser(48, "Melee") Goto See Pain: MAUD H 2 MAUD H 2 Fast A_Pain Goto See Death: MAUD I 8 MAUD J 8 A_Scream MAUD K 4 MAUD L 4 A_Fall MAUD M 4 MAUD N -1 Stop Raise: MAUD N 5 MAUD MLKJI 5 Goto See } } ACTOR DemonAttack { Radius 24 Height 8 Projectile Speed 20 Damage (random(1,2)*2) +ALLOWTHRUFLAGS +MTHRUSPECIES DontHurtShooter +NODAMAGETHRUST States { Spawn: TNT1 A 10 TNT1 A 10 A_ChangeFlag("NOGRAVITY", FALSE) Stop } } Species shouldn't be necessary since you're inheriting from the Demon class, but we never know. I tested it like this and it works, kinda... I unfortunately found out that the "killing machine" issue is inevitable (?) in DECORATE. I couldn't figure out if it was cause of my modifications to the original code or not, so I tested the original MaulerDemon and it has the same exact issue. I took a look to the ZSCRIPT then and found this: Spoiler See: MAUD AABBCCDD 2 { //Thanks to Blue Shadow for this routine statelabel st = null; //Default to no missile state if (CheckIfCloser(target, 224)) //If we're close enough to charge st = "Missile"; //Then set missile state so we can charge A_Chase("Melee", st); //And chase } Loop; And I think this is the solution to the machinegun bites attack issue, but it's only doable in ZSCRIPT, so this is (probably) your only option. 0 Quote Share this post Link to post
K_Doom Posted March 2, 2022 (edited) 13 hours ago, Kan3 said: Ok, I've took a look at it and made a few changes cause there was unnecessary stuff. Here's the code if you want to take a look at: Reveal hidden contents ACTOR MaulerDemon : Demon 13000 { //$Category Monsters Health 300 PainChance 90 Speed 15 Radius 34 Height 56 Mass 450 Monster Scale 1.5 +FLOORCLIP +DONTHURTSPECIES Obituary "%o foi atravessado pelos chifres do demonio estraçalhador." HitObituary "%o foi brutalizado pelo demonio estraçalhador" tag "MaulerDemon" Species "Demon" Scale 1.20 States { Spawn: MAUD AB 10 A_Look Loop See: MAUD AABBCCDD 2 A_Chase Loop Melee: MAUD EF 4 A_FaceTarget MAUD G 6 A_CustomMeleeAttack(random (10, 15)*4, "demon/melee", "demon/melee") Goto See Missile: MAUD E 0 A_Jumpifcloser(220, 2) Goto See MAUD E 8 A_FaceTarget TNT1 A 0 A_CustomMissile("DemonAttack",30,0,0) MAUD F 10 A_SkullAttack MAUD G 5 A_Gravity MAUD E 0 A_Jumpifcloser(48, "Melee") Goto See Pain: MAUD H 2 MAUD H 2 Fast A_Pain Goto See Death: MAUD I 8 MAUD J 8 A_Scream MAUD K 4 MAUD L 4 A_Fall MAUD M 4 MAUD N -1 Stop Raise: MAUD N 5 MAUD MLKJI 5 Goto See } } ACTOR DemonAttack { Radius 24 Height 8 Projectile Speed 20 Damage (random(1,2)*2) +ALLOWTHRUFLAGS +MTHRUSPECIES DontHurtShooter +NODAMAGETHRUST States { Spawn: TNT1 A 10 TNT1 A 10 A_ChangeFlag("NOGRAVITY", FALSE) Stop } } Species shouldn't be necessary since you're inheriting from the Demon class, but we never know. I tested it like this and it works, kinda... I unfortunately found out that the "killing machine" issue is inevitable (?) in DECORATE. I couldn't figure out if it was cause of my modifications to the original code or not, so I tested the original MaulerDemon and it has the same exact issue. I took a look to the ZSCRIPT then and found this: Reveal hidden contents See: MAUD AABBCCDD 2 { //Thanks to Blue Shadow for this routine statelabel st = null; //Default to no missile state if (CheckIfCloser(target, 224)) //If we're close enough to charge st = "Missile"; //Then set missile state so we can charge A_Chase("Melee", st); //And chase } Loop; And I think this is the solution to the machinegun bites attack issue, but it's only doable in ZSCRIPT, so this is (probably) your only option. I managed to solve the A_SkullAttack "bite machine gun" problem, this way 👇 Spoiler ACTOR MaulerDemon : Demon 13000 { //$Category Monsters Health 300 PainChance 90 Speed 15 Radius 34 Height 56 Mass 450 DamageType Bite Monster Scale 1.5 +FLOORCLIP +DONTHURTSPECIES SeeSound "demon/sight" AttackSound "demon/melee" PainSound "demon/pain" DeathSound "demon/death" ActiveSound "demon/active" Obituary "%o was gored by a Mauler Demon." HitObituary "%o was mauled by a Mauler Demon." tag "MaulerDemon" Scale 1.20 States { Spawn: MAUD AB 10 A_Look Loop See: MAUD AABBCCDD 2 A_Chase Loop Melee: MAUD EF 4 A_FaceTarget MAUD G 6 A_CustomMeleeAttack(random (10, 15)*4, "demon/melee", "demon/melee", Bite) Goto See Missile: MAUD E 0 A_Jumpifcloser(200, 2) MAUD E 0 A_Jumpifcloser(10, "Melee") Goto See MAUD E 4 A_FaceTarget TNT1 A 0 A_CustomMissile(DemonAttack,30,0,0) MAUD F 10 A_SkullAttack(15) MAUD G 5 A_Gravity MAUD E 0 A_Jump(256, "Melee") Goto See Pain: MAUD H 2 MAUD H 2 Fast A_Pain Goto See Death: MAUD I 8 MAUD J 8 A_Scream MAUD K 4 MAUD L 4 A_Fall MAUD M 4 MAUD N -1 Stop Raise: MAUD N 5 MAUD MLKJI 5 Goto See } } ACTOR DemonAttack { health 20 Radius 12 Height 48 DamageType Bite Projectile Speed 50 Damage (random(3,5)*2) DontHurtShooter SeeSound "none" DeathSound "none" Decal "none" +ALLOWTHRUFLAGS +MTHRUSPECIES +NODAMAGETHRUST States { Spawn: TNT1 A 10 TNT1 A 10 A_ChangeFlag("NOGRAVITY",false) Stop } } The first week I started to insert monsters in my wad I tried to use zscript, but I had problems in UBD when I wanted to add other monsters in MAPINFO. In the future maybe I can try again, when I want to use a functionality that doesn't have in decorate but has in zscript. Thanks for the help, I think I got as close to what I wanted. :') Edited March 2, 2022 by K_Doom edit 1 Quote Share this post Link to post
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.