Changing Berserk red tint duration

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!)

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Changing Berserk red tint duration

Re: Changing Berserk red tint duration

by Arctangent » Sun Jan 13, 2019 11:25 am

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.

Re: Changing Berserk red tint duration

by ramon.dexter » Sun Jan 13, 2019 1:42 am

Yes, graf pretty clearly tells you what has to done ;)

Re: Changing Berserk red tint duration

by Boondorl » Sat Jan 12, 2019 7:37 pm

For some reason I thought it used the standard blinking effect other power ups use when running out. :lol: 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.

Re: Changing Berserk red tint duration

by Graf Zahl » Sat Jan 12, 2019 5:22 pm

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.

Changing Berserk red tint duration

by Boondorl » Sat Jan 12, 2019 1:35 pm

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?

Top