Started by
Evanhere
on
Topic category: Help with Minecraft modding (Java Edition)
I wanna do a potion effect that makes you invinicable until the effect is over and then its deals all the damage you accumulated lakefront the mod Pick your Poison
Add a custom, player-lifetime number variable. (I'll call it 'accumulated_damage.') Then make a global procedure with the trigger 'before entity is hurt.'
Check if the entity is a subtype of a player, and that they have the potion effect. If this is the case, cancel the event. (You can find this function in the 'advanced' tab.) Instead, add the 'amount' dependency to the 'accumulated_damage' variable. (Set the variable to itself, plus the amount of damage dealt. When the effect expires, or reaches 1 tick remaining, deal damage to the entity equal to this variable.