Looking to make an enemy/friendly that roars and does an AOE attack. It's a short ranged one and ideally would send its enemies backwards. I have the sprites for the animation of the AOE attack, but I would like to know how to make something like this work in ZScript.
It doesn't have to be too specific, maybe an invisible "grenade" that blows up immediately upon the use of the AOE attack. I would ideally like to make the AOE send enemies back a bit but if not then simply a burst of flame projectiles that spread upon the grenade being used would be cool. I would need to consider the range though. How would this work code wise within ZScript syntax or specific functions?
Zscript AOE for Enemy Monster [RESOLVED]
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
Psychojack88
- Posts: 53
- Joined: Sat May 07, 2022 10:12 pm
- Graphics Processor: nVidia (Modern GZDoom)
Zscript AOE for Enemy Monster [RESOLVED]
Last edited by Psychojack88 on Fri Oct 24, 2025 11:03 am, edited 1 time in total.
Re: Zscript AOE for Enemy Monster
The most basic AOE attack imaginable is A_Explode
Does AOE damage, pushes actors away from its center, has configurable radius.
But if you want something more specific you'll need to give more details.
Does AOE damage, pushes actors away from its center, has configurable radius.
But if you want something more specific you'll need to give more details.
-
Psychojack88
- Posts: 53
- Joined: Sat May 07, 2022 10:12 pm
- Graphics Processor: nVidia (Modern GZDoom)
Re: Zscript AOE for Enemy Monster
Okay then. I am trying to make an AOE attack. It currently has its own state.
I have two separate actors for this attack. One to push enemies without doing damage (the impact of the explosion). It's supposed to send enemies away a few feet.
The AOE is supposed to start from the custom monster and spreads in a radius while it's still. It is not supposed to be one directional. With this in mind I tried to get the monster to use it but it seems unable to use it for the moment. (Nothing seems to come out, but the animation plays.) Hence why I came here to see what I may be doing wrong or simplify it to get straight to the point instead of adding features that lead me astray. I have only been modding for less than a month I think and created a few interesting attacks but have yet to have made an AOE type of attack.
Code: Select all
AOE:
DAAE ABC 4;
DAAE D 4; A_SpawnProjectile("PusherEffect", 32, 0, 0, RADF_NODAMAGE); //MAKE THIS INTO IT'S OWN BERSERK STATE?
DAAE E 4; A_CustomMissile("ExplodeAOE", 0, -24);
DAAE FGH 4;
Goto See;
}Code: Select all
//class PusherEffect : Actor
{
Default
{
Projectile;
-ACTIVATEPCROSS;
+NODAMAGE; // The projectile deals no damage itself
+NOEXTREMEDEATH;
-NOGRAVITY;
Radius 5;
Height 5;
}
States
{
Spawn:
TNT1 A 1;
stop;
Death:
TNT1 A 0
{
A_RadiusThrust(4000, 100, RTF_NOIMPACTDAMAGE); // Pushes actors away
A_Explode(0, 100, 0, false, 0, 0, 0, "AOE"); // Apply a custom damage type with zero damage
}
stop;
}
}
Here's the actor for the actual damage from the AOE attack.
[code]//=========================================================
// AOEEffect - CAN'T GET THIS TO WORK AT THE MOMENT...
//=========================================================
class ExplodeAOE : Actor
{
Default
{ Radius 4;
Height 4;
Speed 20;
Damage 10;
RenderStyle 'Add';
Alpha 1.0;
DamageType "OnlyEnemyDamage";
Projectile;
+NOGRAVITY;
+SEEKERMISSILE;
+THRUSPECIES;
}
States
{
Spawn:
// Execute a radius attack immediately
DABL ABC 4 int RadiusAttack("PJ_RoarMonster", 40, 50, Name bombmod = 'PusherEffect',RADF_CIRCULAR, RADF_NOALLIES,);
Stop;
Death:
DABL DEF 3 BRIGHT;
Stop;
}
}-
Psychojack88
- Posts: 53
- Joined: Sat May 07, 2022 10:12 pm
- Graphics Processor: nVidia (Modern GZDoom)
Re: Zscript AOE for Enemy Monster
After much experimenting I think I have an idea as to how to make this work via the A_Explode function that Proydoha mentioned to at least simulate AOE effects without too much strain. Thank you for your help in letting me know about this Proydoha. Really appreciate it.