Buffs/Debuffs & DoTs/HoTs


In order to implement over time affects and lasting buffs/debuffs we modified our health component to keep track of the base value relevant to the player, alongside the current value. For things like reducing/increasing the movement speed of the player temporarily this allows us to set the current value to the (default * modifier) and simply set the current back to default when the effect has expired. Similarly for damage over time affects we assign them to an array on the player and loop through that array once a second.  The array will check the ID's of the affects inside and act upon them, dealing damage to the player for each poison, burn, or bleed and healing them if they have regeneration.  While the Burns/Poisons/Bleeds currently have the same implementation, they can be adjusted as needed to allow for things such as poison not being able to kill the player, or bleeds applying a movement slow.

Files

Capture2.PNG 64 kB
Jun 28, 2024
Capture.PNG 7.2 kB
Jun 28, 2024

Get Proving Grounds

Leave a comment

Log in with itch.io to leave a comment.