A plugin which helps to implement status effects in your prototype.
The plugin can be used in both C++ and Blueprint projects.
- Download the latest package file;
- Install the plugin either in your project or for all projects in engine:
- Unzip the package into Plugins folder of your project, e.g.
D:\UnrealProjects\MyProject\Plugins; - Unzip the package to the Plugins folder in engine folder, e.g.
C:\Program Files\Epic Games\UE_5.0\Engine\Plugins;
- Unzip the package into Plugins folder of your project, e.g.
- Restart the project;
- Create the Plugins folder in the project directory;
- Create the TrickyAnimationComponents folder in the Plugins folder;
- Download the plugin source code into that folder;
- Rebuild the project;
You can find other plugins on my itch.io;
The plugin contains:
- StatusEffect object;
- StatusEffectsManagerComponent;
- StatusEffectsLibrary;
A simple object which encapsulates status effect logic.
Use this object to create your status effects.
By default it has one variable StatusEffectData, this structure contains:
Instigator- the actor which applied the status effect;TargetActor- the target actor of the status effect;OwningManager- status effects manager component which owns the status effect;EffectType- determines status effect type;PositiveNegativeNeutral
EffectUniqueness- determines how many instances of the status effect can be created:Normal- no limits;PerInstigator- instigator can apply only one status effect of this class on a target;PerTarget- only one status effect of this class can be applied to the target;
IsInfinite- toggles if the status effect has infinite duration or not;Duration- duration of the effect;DurationTimerHandle- a duration timer handle of the status effect;DurationReActivationBehavior- determines how the duration will be recalculated when the status effect was reapplied.None- no changes;Custom- by default do nothing, but can be overriden;Reset- reset the timer;Add- add duration to the remaining time;
IsStackable- toggles if the status effect can be stacked;MaxStacks- maximum amount of stacks;InitialStacks- initial amount of stacks;CurrentStacks- current amount of stacks;StacksReActivationBehavior- determines how current stacks will be recalculated when the status effect was reapplied.None- no changes;Custom- by default do nothing, but can be overriden;Reset- reset the current stacks to initial value;Add- add delta stacks to current stacks;
DeltaStacks- amount of stacks added per re-activation;
GetInstigator- returns instigator;GetTargetActor- returns target actor;GetOwningManager- returns owning manager;GetEffectType- returns effect type;GetUniqueness- returns status effect uniqueness;GetIsInfinie- returns if the status effect is infinite or not;GetDuration- returns duration ifIsInfinite== false, else -1;GetRemainingTime- returns remaining time ifIsInfinite== false, else -1;GetElapsedTime- returns elapsed time ifIsInfinite= false, else -1;IsStackable- returns if the status effect is stackable;GetMaxStacks- returns maximum amount of stacks;GetCurrentStacks- returns current amount of stacks;AddStacks- increases the number of stacks;RemoveStacks- decreases the number of stacks;HandleEffectActivation- called when the status effect was activated. Override this function to implement logic;HandleEffectReactivation- called when the status effect was reactivated. Override this function to implement logic;HandleEffectDeactivation- called when the status effect was deactivated. Override this function to implement logic;HandleStacksIncrease- called when the number of stacks was increased. Override this function to implement logic;HandleStacksDecrease- called when the number of stacks was decreased. Override this function to implement logic;
OnStatusEffectDeactivated- called when the status effect was deactivated;OnStatusEffectReactivated- called when the status effect was reactivated;OnStacksAdded- called when current number of stacks was increased;OnStacksRemoved- called when current number of stacks was decreased;
An actor component which handles status effects applied to its owner.
ActiveEffects- an array of active effects;DebugEnabled- toggles debug information on screen in editor;
ApplyEffect- applies a new status effect or reapplies already applied effect;RemoveAllEffects- removes all status effects regardless of time and stacks;RemoveAllPositiveEffects- removes all positive status effects regardless of time and stacks;RemoveAllNegativeEffects- removes all negative status effects regardless of time and stacks;RemoveAllNeutralEffects- removes all neutral status effects regardless of time and stacks;RemoveEffectOfClass- removes the first found status effect of a given class;RemoveAllEffectsOfClass- removes all status effects of a given class regardless of remaining time and stacks;RemoveEffectOfClassByInstigator- removes the first found status effect of a given class of specific instigator;RemoveAllEffectsOfClassByInstigator- removes all status effects of a given class of specific instigator regardless of remaining time and stacks;RemoveEffectByObject- removes a specific instance of the status effect;GetAllActiveEffects- returns all active status effects;GetAllPositiveEffects- returns all active positive status effects;GetAllNegativeEffects- returns all active negative status effects;GetAllNeutralEffects- returns all active neutral status effects;HasEffectOfClass- checks if the status effect of a given class is active;GetEffectOfClass- returns the status effect instance of the given class;GetAllEffectsOfClass- returns all status effect instances of the given class;HesEffectOfClassByInstigator- checks if the status effect of a given class and instigator is active;GetEffectOfClassByInstigator- returns the status effect instance of the given class and instigator;GetAllEffectsOfClassByInstigator- returns all status effect instances of the given class and instigator;
OnStatusEffectApplied- called when a new status effect applied or old effect reapplied;
A utility library for applying, removing, and getting status effects.
ApplyStatusEffect- applies a new status effect or reapplies already applied effect;RemoveAllStatusEffects- removes all status effects regardless of time and stacks;RemoveAllPositiveStatusEffects- removes all positive status effects regardless of time and stacks;RemoveAllNegativeStatusEffects- removes all negative status effects regardless of time and stacks;RemoveAllNeutralStatusEffects- removes all neutral status effects regardless of time and stacks;RemoveStatusEffectOfClass- removes the first found status effect of a given class;RemoveAllStatusEffectsOfClass- removes all status effects of a given class regardless of remaining time and stacks;RemoveStatusEffectOfClassByInstigator- removes the first found status effect of a given class of specific instigator;RemoveAllStatusEffectsOfClassByInstigator- removes all status effects of a given class of specific instigator regardless of remaining time and stacks;RemoveStatusEffectByObject- removes a specific instance of the status effect;GetAllActiveStatusEffects- returns all active status effects;GetAllPositiveStatusEffects- returns all active positive status effects;GetAllNegativeStatusEffects- returns all active negative status effects;GetAllNeutralStatusEffects- returns all active neutral status effects;HasStatusEffectOfClass- checks if the status effect of a given class is active;GetStatusEffectOfClass- returns the status effect instance of the given class;GetAllStatusEffectsOfClass- returns all status effect instances of the given class;HesStatusEffectOfClassByInstigator- checks if the status effect of a given class and instigator is active;GetStatusEffectOfClassByInstigator- returns the status effect instance of the given class and instigator;GetAllStatusEffectsOfClassByInstigator- returns all status effect instances of the given class and instigator;