Need help with natural regen of bar

Started by AravindGamer712 on Mon, 11/29/2021 - 17:33

Topic category: Help with modding (Java Edition)

Last seen on 15:20, 6. Dec 2021
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Need help with natural regen of bar
Mon, 11/29/2021 - 17:33


So i wanted to make the Mana amount go up every 80 ticks till mana reaches 10 is this good or does this not work?
please help

Last seen on 05:25, 26. Jan 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
image not working... you can…
Tue, 11/30/2021 - 06:54

image not working... you can use a while-loop to check if the mana is less than 10, then you use a wait procedure block that waits 80 ticks to increase the mana.

Last seen on 05:25, 26. Jan 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
the latest one you posted…
Wed, 12/01/2021 - 15:19

the latest one you posted should work.

though if your mana goes above 10, it'll just keep rising without stopping

If you want to keep your mana from rising and allow it to go above ten, you should replace the "=" sign with ">=" greater than equal sign. this'll make sure your mana stops rising when its 10 or higher.

If you want to have a max mana, add another if statement that checks if the mana is greater than max mana and if so, set it to the max mana.

 

Hope i helped! <3

Last seen on 15:20, 6. Dec 2021
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
thank you very much i will…
Thu, 12/02/2021 - 16:33

thank you very much i will do that cause I don't want it to go above 10 for now