BuffActor: PrimalBuff
This BUFF is an Actor attached to the player
Includes sound effects components, Niagara components, and particle emitter components
Need to add CharacterStatusComponent and BuffComponent for the character
BUFF will be automatically removed after the time, but the gain effect needs to be removed in the RemoveBuff function
Variable | Explain |
---|---|
Duration | Durable, which is actually the expiration time. Use GetTimeRemaining to obtain the remaining time |
MaxDuration | Maximum durability, the maximum time that this BUFF can have, used to limit the prevention of malicious stacking |
ElapsedTime | Gained time |
AttachmentSocket | Additional slots (Mesh) for special effects systems |
BuffIcon | BUFF icon, UI usage |
Sound | Sound effects, which can be long-term (burning) or one-time sound effects |
NiagaraPS/ParticlePS | Niagara system/particle emitter system can be used simultaneously |
TimerInterval | Tick interval time, used to call BuffTick |
Function | Explain |
---|---|
ModifyValue | Calling CharacterStatusComponent ->ModifyValue Used for variable attributes such as increased or decreased health in BUFF |
ModifyAddation | Calling CharacterStatusComponent ->ModifyAddition Used to increase or decrease fixed attributes such as armor in BUFF |
GetTimeRemaining | Obtain BUFF remaining time |
Deactivate | Destroy BUFF (slow) |
ResetTime | reset time |
MulticastDestroyBuff | Multicast removes BUFF, and finally calls Deactivate |
Please overload the following functions to implement the specific BUFF effect, otherwise there will only be special effects and sound effects
Override Function | Explain |
---|---|
AddBuffCheck | Add a BUFF check. If a BUFF is added, the function will be requested first. If one of the BUFFs returns false, the BUFF will not be added. The default is to reset the time if the same BUFF is detected Usage examples: The character will thaw after being frozen, and cannot be frozen again for a period of time Add a non freezing BUFF to add to the character during thawing, Overload AddBuffCheck in this BUFF to check if the BuffClass is a frozen BUFF. If it is a frozen BUFF, return a failure |
RemoveBuff | Remove BUFF, please remove BUFF gain here |
ApplyBuff | Add BUFF, similar to BeginPlay, adding BUFF effect here |
BuffTick | Similar to Tick, it is used for operations such as restoring health to a character for a certain period of time, with an interval of TimerInterval |