Changing Berserk red tint duration
Moderator: GZDoom Developers
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!)
Changing Berserk red tint duration
Bit of an odd one, but how exactly do you change this? PowerStrength already has a duration of 1 tic but just seems to ignore it anyway. Is there a way to get around this?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Changing Berserk red tint duration
Surely you can do something here. But as you noticed it is coded into the object itself so you'll have to take the ZScript implementation for PowerStrength and create a copy, and then a new item replacing the original Berserk to give that new power.
Re: Changing Berserk red tint duration
For some reason I thought it used the standard blinking effect other power ups use when running out. I guess that gets me to the real question:
Is there a way to speed up the fading out effect? I'd like to cut it down to about 3 seconds or so.
Is there a way to speed up the fading out effect? I'd like to cut it down to about 3 seconds or so.
- ramon.dexter
- Posts: 1529
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: Changing Berserk red tint duration
Yes, graf pretty clearly tells you what has to done
- Arctangent
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
- Contact:
Re: Changing Berserk red tint duration
Specifically, it's done through manipulation of PowerStrength's EffectTics variable, which is then fed into its GetBlend function to produce a screen blend that fades over time instead of being tied to its duration ( as it has none ). There's multiple angles you could take with this - the simplest would be to make EffectTics go up by more than 2, but you could also alter the blend itself to start less intense, or to fade exponentially instead of linearly.