Ghosts and stuff
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone
Ghosts and stuff
Is it currently possible to make enemy melee attacks (A_CustomMeleeAttack) pass through ghosts, given that player melee attacks (weapons) and all projectile attacks can be set up this way.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Ghosts and stuff
No. Monster melee attacks work completely differently and never check for this.
Re: Ghosts and stuff
Only way I can think of how you could emulate your behavior is with a fastprojectile that passes through ghost for your melee attack. Set the projectile up so that it dies after it travels 48-64 units (multiple ways to do this) and have it do the actual damage at a high traveling speed 2x it's maximum range (96-128) in this case. This will similar the effect of the projectile hitting the target instantly. While the +THRUGHOST flag will make it pass through ghost doing no damage.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Ghosts and stuff
For monster melee attacks I use [wiki]A_CustomBulletAttack[/wiki] with a very short range, specifically so I can use puffs. +THRUGHOST is placed on the weapon though, not the puff, so this doesn't help.
Since DamageType and other properties can be gotten from a puff, could +THRUGHOST as well? Or would it not work, as the puff is technically "spawned" after a successful hit, and that's the only time those properties are needed?

Since DamageType and other properties can be gotten from a puff, could +THRUGHOST as well? Or would it not work, as the puff is technically "spawned" after a successful hit, and that's the only time those properties are needed?
- XutaWoo
- Posts: 4005
- Joined: Sat Dec 30, 2006 4:25 pm
- Location: beautiful hills of those who are friends
- Contact:
Re: Ghosts and stuff
Bingo.NeuralStunner wrote:Or would it not work, as the puff is technically "spawned" after a successful hit, and that's the only time those properties are needed?