how to make a number variable apear in overlay?

Started by mohammed fawzi on

Topic category: Help with MCreator software

Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make a number variable apear in overlay?

i made a global variable and set it to the current health of the player and returned it and i want to display that varaible as overlay how to do it?

 

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a procedure for a…
Sat, 09/23/2023 - 19:32

Create a procedure for a return string and in the string use the "create text with" block (located in string/text tab) then put your text that says something like "Health" in one string and then for the other string slot put your "get global variable".

 

Then in the overlay, create a text box, and do not put in any text. Select the "fixed" option and change it to the return procedure you just created.

 

Then you can make it all look pretty, and you're all done!