Started by
WafflesQueen
on
Topic category: Help with Minecraft modding (Java Edition)
I am attempting to make a potion that deals damage to a player for 5 seconds, and if they survive, they get an achievement and effect. What would be the best way for going about creating this type of checker. As of right now, I am just checking if the player is dead after 5 seconds, but if they die immediately, and respawn, they can get the achievement.
The wait function probably isn't the way to go here. I'd make some custom logic variables. Set a logic variable to true when the player gains the effect, false if they remove it prematurely or die, and then if they no longer have the effect but the variable is true, reset the variable and give them the achivement.