How do i make mana

Started by CyberAssasian on Thu, 04/08/2021 - 11:56

Topic category: Help with modding (Java Edition)

Last seen on 20:04, 14. Apr 2021
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do i make mana
Thu, 04/08/2021 - 11:56

I want to make a mana system for my mod
It needs to:
Be consumed by various tools/ranged items/blocks
Prevent said things from being used if the mana cost is above your current mana
Be displayable on the screen as a number
Be upgradable using advancments

Last seen on 22:51, 14. Apr 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Easy, go on variable tab at…
Thu, 04/08/2021 - 15:52

Easy, go on variable tab at the left of your screen, add a variable named Mana with those configs: Type Number, Player_Persistant. and set the initial amount to (what u want, 0 if you want for the player to start with 0 mana).after, create another  variable named max_mana, and set it to the max amount of mana the player can have. after create a Overlay, add a Label Text and where you write <VAR:Integer:mana>/<VAR:Interger:max_mana> and put the text where you want. this will show the amount of mana on your screen. (if this <VAR:Integer:mana>/<VAR:Interger:max_mana> dont work, tell me ill send you screenshots too show you how.)

Last seen on 06:16, 13. Apr 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It does not sound easy at all
Thu, 04/08/2021 - 15:57

It does not sound easy at all

Last seen on 06:16, 13. Apr 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It does not sound easy at all
Thu, 04/08/2021 - 15:58

It does not sound easy at all

Last seen on 20:04, 14. Apr 2021
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
so now i have the variables…
Thu, 04/08/2021 - 16:15

so now i have the variables how do I do points 1 and 2? Ive never understood player variables

Last seen on 14:11, 14. Apr 2021
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I made a video tutorial on a…
Thu, 04/08/2021 - 18:07

I made a video tutorial on a Custom Health Bar, just follow it and modify some of it to fit your use - https://youtu.be/kyxSPIczdCU