Started by
nizxwoof
on
Topic category: Help with Minecraft modding (Java Edition)
im kinda new to this kind of stuff and i kinda want to learn and make some myself too.
what i got in mind is an armor set that when you wearing all of them, it will give some specific passive like: under 25% healths give effect for x seconds,... thats also toggleable (like if i wearing all armor, auto make it active but incase i dont need it, i can just toggle it and make the passive not active anymore)
You can toggle it with a keybind? Use the keybind element and set it to whatever you want. Then make a variable (ability_override), player persistent logic, and on keybind pressed if variable(ability_override)=true, toggle variable(ability_override) to false, else toggle variable to true. Make another variable (ability), player persistent logic, then on player tick update, check for helmet in armor slot 0, chestplate in armor slot 1, leggings in armor slot 3, boots in armor slot 4, variable(ability_override)=false. If all =true, set variable(ability) to true, else if variable=true set variable to false. The variable(ability) is your ability toggle and the variable(ability_override) overrides the previous toggle. When you wear it all the ability toggles on, when you press the keybind the ability toggles off.
For the ability, use another player tick update for the ability, or use the same one to check for the armor slots. Either way you use an if to check if variable(ability)=true, and variable(ability_override)=false, if so then do what you want. Run other checks for health values and then apply effects and such.
okay so i dont know much about these and ive try to follow ur instruction, hope these images is enough for u to check for me if im wrong at any of those procedure. i really appreciate ur time <3
edit: i figured it out (after asking my friends to help me fix it)
it did work really well now, just a bit delay on the effect side but i think its fine haha. ty for ur time
Okay that's good :)