Need help making a mana bar

Started by nilek20 on Mon, 09/07/2020 - 14:53

Topic category: Help with modding (Java Edition)

Last seen on 07:00, 23. Sep 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Need help making a mana bar
Mon, 09/07/2020 - 14:53

I am working on adding spells to my mod and i want to make a mana attribute (similar to the vanilla hunger bar) but am not really sure how to go about it. I have looked at the overlay creator and have no clue how to use it to make what i want. If this is overly complicated i don't need it to have a bar and can just add the stat. once i have the stat, how do i set the mana to regen at a certain rate.

Last seen on 17:57, 21. Aug 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I suggest making a Player…
Mon, 09/07/2020 - 19:45

I suggest making a Player_Lifetime variable named mana, and then a procedure that increases its value by a little every few update ticks.

Last seen on 21:46, 16. Jan 2021
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
how do i do this though do…
Wed, 09/23/2020 - 14:23

how do i do this though do you know  a tutorial I'm not as gifted as you are with these skills

Last seen on 19:32, 22. Sep 2021
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I've done a very similar…
Wed, 09/23/2020 - 15:21

I've done a very similar thing in a large mod I'm currently working on.

What you'll need is a global variable bound to a player, and one overlay for every segment of the mana bar (mine has 8 because I didn't feel like making 20). Set the overlay to only appear when the mana variable is at its corresponding value, e.g. set the overlay for 0 mana to only appear when the numerical value of the variable is 0. Repeat this process for every overlay, making sure to adjust the conditions properly. Then create ingame methods of gaining/losing mana.

Last seen on 21:46, 16. Jan 2021
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
could you send the procedure…
Wed, 09/23/2020 - 15:47

could you send the procedure please please please

Last seen on 21:46, 16. Jan 2021
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
please send the procedures…
Wed, 09/23/2020 - 15:52

please send the procedures please

Last seen on 19:32, 22. Sep 2021
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
There really aren't any…
Wed, 09/23/2020 - 16:58

There really aren't any large procedures, just ones in each overlay to detect if the variable has the corresponding mana amount.

Last seen on 21:46, 16. Jan 2021
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
it would make my life much…
Wed, 09/23/2020 - 17:31

it would make my life much easier please

Last seen on 19:32, 22. Sep 2021
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I don't seem to be able to…
Wed, 09/23/2020 - 18:27

I don't seem to be able to post images.

Last seen on 00:06, 26. Sep 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
how do i make variables???
Tue, 02/16/2021 - 04:45

how do i make variables???

Last seen on 00:06, 26. Sep 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
sorry, i know now, but how…
Tue, 02/16/2021 - 04:52

sorry, i know now, but how do i make global variables? there is no button anywhere to make or delete one

Last seen on 00:06, 26. Sep 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
nvm i figured out before
Tue, 02/16/2021 - 23:45

nvm i figured out before