Page 1 of 1

Changing Berserk red tint duration

PostPosted: Sat Jan 12, 2019 2:35 pm
by Boondorl
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?

Re: Changing Berserk red tint duration

PostPosted: Sat Jan 12, 2019 6:22 pm
by Graf Zahl
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

PostPosted: Sat Jan 12, 2019 8:37 pm
by Boondorl
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

PostPosted: Sun Jan 13, 2019 2:42 am
by ramon.dexter
Yes, graf pretty clearly tells you what has to done ;)

Re: Changing Berserk red tint duration

PostPosted: Sun Jan 13, 2019 12:25 pm
by Arctangent
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.