Armor Infinitely Increasing Variable

Started by s_crowe31 on

Topic category: Help with modding (Java Edition)

Last seen on 22:00, 8. Oct 2024
Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Armor Infinitely Increasing Variable

I want to have my armor piece increase my global variable "Energy" by 35 when equipped, however because the procedure is checking for whether the armor is equipped or not every player tick, it is also increasing "Energy" by 35 every player tick. Is there a way around this? Images with code blocks would be helpful, I'm very amateur at this, but any help is much appreciated. Thank you bunches for your time and brainpower!!!

Link to my current code block

https://www.dropbox.com/scl/fi/p2nrllex1naz26b0ixu0k/Screenshot-2024-10…