Detecting 0 damage hits with vanilla monsters?

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Lord Misfit
Posts: 222
Joined: Wed Dec 27, 2006 8:13 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: Canton, OH

Detecting 0 damage hits with vanilla monsters?

Post by Lord Misfit »

So I've been off and on working on a sort of combatlog minimod. I've gotten it to use the WorldThingDamaged and WorldThingRevived events to detect and print out logs for damage received and resurrections by Archvile, but I've not been able to add it where if a vanilla monster takes no damage that it can print out a log to tell the player. WorldThingDamage doesn't trigger [as I can tell] on 0-damage hits, so that's out of the question. I've also tried attaching a damage-handling inventory item to vanilla monsters to circumvent the problem, but that doesn't seem to work, as it appears 0 damage hits never cycle through defense-type inventory items the vanilla monster has.

The point of this minimod is to never alter the existing/vanilla monsters directly by having to add in/code replacement versions over top them like in my proper mods, so I also can't use DamageMobj to get around it this way like I can in those mods, so I'm putting this in Feature Suggestions if only because I'm not sure if there's any current means to do what I'm asking about without adding one in (like if there's a feasible way to detect if a monster takes a hit in general, damage or no damage dealt by said hit), so if there isn't one, I'd like to ask about trying to add that in as a feature. I'm not sure if it's something you could do with WorldThingDamaged or not. This wouldn't be for modifying damage directly, so it's not the same as Major Cooke's original idea for an "adddamage" function he first suggested and then dropped some time back, but something else.

If this is already doable without adding a new feature, feel free to explain that and you can move this topic to the ZScript coding forum instead. Thanks. o.o
yum13241
Posts: 781
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support

Re: Detecting 0 damage hits with vanilla monsters?

Post by yum13241 »

Do a 1 damage hit, then heal the monster?

Return to “Feature Suggestions [GZDoom]”