How to make a chakra system

Started by dragonverse on Sat, 05/21/2022 - 10:11

Topic category: Advanced modding

Last seen on 14:20, 6. Jun 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make a chakra system
Sat, 05/21/2022 - 10:11

Hello I want to make a chakra system with a gui which would allow the chakra to increase does anyone know how to do this If so please help me would be appreciated 

Last seen on 17:29, 21. Jun 2022
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
From what I'm reading you…
Sat, 05/28/2022 - 16:51

From what I'm reading you want some sort or variable/number system. Something like Mana from Terraria for example.

If you want to make that, you would start with making two variables, one for current Chakra and one for max Chakra (Max Chakra variable is not always needed, but you have to make it if you want to increase max Chakra later). Make a procedure and set the call to "on world tick", that will make the procedre run every tick. with that increase the chakra by your selected number.

Don't forget to add an if statement to check if your chakra is above max Chakra or not.

You can also add other variables to the mix like Chakra regeneration, in this you just increase Chakra by chakra regen each tick, with that you can make it so chakra regen also slowly increases each tick so it looks like your chakra increases exponentially.

 

Hope this helped with the more technical side of things