Started by
WELLOTHEHERO
on
Topic category: Help with Minecraft modding (Java Edition)
If the player's health drops below 2, I want to give an effect to him, why doesn't it work?
image:https://imgur.com/a/1XU2nTe
Edited by WELLOTHEHERO on Sat, 12/18/2021 - 22:25
This procedure would give the player speed if they had health below 2 HP(1 heart) as soon as they entered the world (which is pretty much impossible.) To fix it, you should set the Event trigger (start block) to trigger from "On loaded entity tick update", not "Minecraft loads a world." This would cause the player to get speed whenever health drops below 2 HP, or 1 heart.
can ı ask one question? how can ı hide potion effects? ı try to make a new potion effect this effect is hidden and gives you vanilla effects but vanilla effects still visible. how can ı hide them
i did what you said but this time i guess the potions keep repeating and increasing their duration and level and I don't know where to put a ''wait on serverside block'' thing (btw ı doing this mod for singleplayer)
image:https://imgur.com/a/YTmDZUn
image:https://imgur.com/a/F5SuZmP
oops I forgot about that. so you would need to make a variable (a player LIFETIME variable) that could be called something like "effect given?" then you would set the variable to 1 when the effect is given. You will also need an "if" block somewhere (it doesn't matter where as long as the effect block is inside of it) that requires your variable to be at 0.