I’ve been trying to come up with a way to create some sort of ‘bleeding’ system. Say the PC uses a special skill to poison or cause someone to bleed, how would I code it in a way that has ‘ticks’ of damage happen every turn?
I thought about having something like this at the start of every combat turn:
*if (poison = true)
*set enemyhp %- 5
The enemy is heavily poisoned! They are losing HP every turn!
The only thing I’m not sure of if this is the optimal way to do it. Is there a better, more efficient way for this?
You’ll need an event where the trigger will take place. You can have it at the start or the end (or anywhere you think it fits).
Btw, why the %-? Percent-op, or as CS described it as fairmath, will not reduce the [enemyhp] variable to zero. I don’t think not being able to kill the opponent with DoT is something intentional, no?
Oops, me no read well. I thought fairmath prevented things from going below zero, not stopping it BEFORE zero. Whoops. Thanks for the heads up.
I think I can have some sort of ‘check’ in the beginning of each combat turn, I’m just not sure how to code it optimally so it isn’t completely spaghetti’d.