I've always wanted the ability to have state-independent damage flashing in G/ZDoom. I've done several attempts at it, first originally a really, really garbage one using DECORATE and ACS, and now this much nicer (but jankily coded, not super amazingly great with ZScript at the moment) version that works with everything (god bless event handlers!) Be forewarned, it doesn't play super nicely with renderstyles (spectres only seem to work if set to Software fuzz).
https://youtu.be/DhtVmF2qqeA Exciting gameplay footage!!
If anyone's willing to make this less ass, I'd appreciate it.
**EDIT: Just fixed a bug involving it not working when enemies gain health**
Universal ZScript Enemy Damage Flash [Hacky]
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
Universal ZScript Enemy Damage Flash [Hacky]
- Attachments
-
damageflash.wad
- (13.82 KiB) Downloaded 581 times
Last edited by Smedis2 on Tue Jun 23, 2020 3:49 pm, edited 4 times in total.
- Carrotear
- Posts: 165
- Joined: Thu Sep 03, 2015 10:45 pm
- Preferred Pronouns: No Preference
- Graphics Processor: Intel (Modern GZDoom)
Re: Universal ZScript Enemy Damage Flash [Hacky]
Doesn't seem to work with damage numbers, war trophies and nashmove when it's loaded first. When it's loaded last with those mods, the enemies disappear after getting hit.
Re: Universal ZScript Enemy Damage Flash [Hacky]
Strange. I'm able to replicate the apparent conflicts when loading it in a certain order, but the other mods seem to work fine on my end. https://youtu.be/_nrCfYQWF3ICarrotear wrote:Doesn't seem to work with damage numbers, war trophies and nashmove when it's loaded first. When it's loaded last with those mods, the enemies disappear after getting hit.
Could someone else check and see if they have the same issue?
- Carrotear
- Posts: 165
- Joined: Thu Sep 03, 2015 10:45 pm
- Preferred Pronouns: No Preference
- Graphics Processor: Intel (Modern GZDoom)
Re: Universal ZScript Enemy Damage Flash [Hacky]
I just did more testing. having universal entropy behind damage flash causes enemies to disappear. I'll do more testing.
- Carrotear
- Posts: 165
- Joined: Thu Sep 03, 2015 10:45 pm
- Preferred Pronouns: No Preference
- Graphics Processor: Intel (Modern GZDoom)
Re: Universal ZScript Enemy Damage Flash [Hacky]
Ok so far, when I have damage flash in front of the load order it disables most mods. I found a way around that and just put it behind everything and it's fine. Universal Entropy mainly to my knowledge doesn't work right in front of damage flash or behind it. Aside from bugs, this is great to run with the Omega Zero mod and Rampancy.
Edit: Nope it wasnt Entropy. It was the champions mod. I'm bad at identifying things.
2nd Edit: Other things I'm noticing is that in legendoom lite, the legendary glow effect is uhh...suppressed if that makes any sense. Lost Souls in general go invisble after a few hits.
Edit: Nope it wasnt Entropy. It was the champions mod. I'm bad at identifying things.
2nd Edit: Other things I'm noticing is that in legendoom lite, the legendary glow effect is uhh...suppressed if that makes any sense. Lost Souls in general go invisble after a few hits.
Re: Universal ZScript Enemy Damage Flash [Hacky]
Wow! I just realized that the reason the conflicts were happening was probably because I made it "EventHandler" and not "AddEventHandler! Truly a moment of Smart Brain(tm). Fixed now.
Re: Universal ZScript Enemy Damage Flash [Hacky]
Finally fixed the Stinkiest(tm) bug by changing 3 letters. I realized I was passing the Alpha storage variable to an Int and not a Float. And it only took me a whole month to realize this!
- Bodhisattva
- Posts: 54
- Joined: Wed Mar 02, 2016 10:28 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Universal ZScript Enemy Damage Flash [Hacky]
There is a bug that can happen in some wads like Community Chest and Going Down, when the player starts flashing indefinitely after taking damage, making all the weapons completely white for the rest of the level. I've fixed it by adding a !enemy.bFriendly check, so the script doesn't target the player:
This is most likely not the perfect way to do it, but it works fine for me, so I figured I'd tell you.
Code: Select all
class FlashHandler: EventHandler
{
override void WorldThingSpawned(WorldEvent e)
{
let enemy = e.Thing;
if(enemy.bShootable && !enemy.bFriendly)
{
enemy.GiveInventory("FlashItem",1);
}
}
}