For my current project, I am trying to make some damage over time skills. I figured the best why I could do what I want is by having let's say three variables that in the battle event area will modify the enemy's HP overtime, and then skills will increase or decrease the variables to deal damage or heal overtime. The problem I am having is that for my method to work, I would need the skills that deal damage overtime to be able to change a certain variable based on the enemy's position.
So if there is: Goblin A, Goblin B, Goblin C, and variable [1] is for Goblin A, [2] for B, and [3] for C.
If Poison skill is targeting Goblin B, it will check where Goblin B is, find that it is the second monster, and then increase variable [2] to make it take damage.
The reason why I am doing this convoluted process for damage overtimes is because I want HP regen and DOT to be connected, easily stackable and modifiable.
So if there is: Goblin A, Goblin B, Goblin C, and variable [1] is for Goblin A, [2] for B, and [3] for C.
If Poison skill is targeting Goblin B, it will check where Goblin B is, find that it is the second monster, and then increase variable [2] to make it take damage.
The reason why I am doing this convoluted process for damage overtimes is because I want HP regen and DOT to be connected, easily stackable and modifiable.