Started by
ImKaiizuki
on
Topic category: Help with modding (Java Edition)
I am currently trying to make a mod that adds potion effects on the click of a button (G) that when pressed once gives the effect press it a second time it removes it
This one is pretty simple, just check if the player has the active effect, if they don't, give them the effect, if they do, remove the effect
it is not that simple; the problem i face is this when I press (G) it checks if i have a custom potion effect if i do it gives the effects of strength if i don't it does nothing. but when i do the procedure
If event/entity has "custom potion effect"
add potion effect "strength" 20 100000 to event/entity
If event/entity has "strength"
clear all potion effects
add potion effect "custom potion effect" 255 1000000 to event/entity
when i press the button it all happens at the same time is there a way to toggle it on or off or maybe even skip it once
You did it wrong. Here is Step by Step Instructions for Keybindings Scenarios.
First in the "On Key Pressed" Trigger of you Keybind do the Following:
After that create a Procedure with "On player tick update" or "On loaded entity tick update" Global Trigger:
Of course you can modify it for yourself.
please i have checked how do u do boolean?
nvm thx i figured out how to make custom variables thank you soo much it works
im new to modding and i have the same question but i dont understand your instructions. could you please explain in more depth.