Help with variables

Started by MrDaniilsYT on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with variables

I'm redoing the health display. I set up the healtba texture change, but I couldn't set up the text with the numeric value of the player's health on it. How do I make a variable that has a player's health value?

Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You shouldn't need a…
Thu, 01/04/2024 - 03:26

You shouldn't need a variable for the player's health, you should be able to get the player's health directly.

But that might not work with the UI, so:

Create 3 global variables (type number). Then make a procedure to run every tick that updates the variables with the player's position.