EndEffect
Jump to navigation
Jump to search
virtual void EndEffect ()
Contents
Usage
A virtual function called by powerups when their duration runs out and they become inactive, but before they're removed from the actor's inventory.The base Powerup class uses it to restore normal screen blend/colors.
Warning: When overriding this function, always remember to call Super.EndEffect() to make sure player's colormap is properly reset.
|
ZScript definition
Note: The ZScript definition below is for reference and may be different in the current version of GZDoom.The most up-to-date version of this code can be found on GZDoom GitHub. |
The base Powerup class defines it as follows:
virtual void EndEffect ()
{
if (colormap != PlayerInfo.NOFIXEDCOLORMAP && Owner && Owner.player && Owner.player.fixedcolormap == colormap)
{ // only unset if the fixed colormap comes from this item
Owner.player.fixedcolormap = PlayerInfo.NOFIXEDCOLORMAP;
}
}
Examples
Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated. |