How can I display a custom variable as a text in an overlay?

Started by Flintofsteel on

Topic category: Help with modding (Java Edition)

Last seen on 20:01, 29. Oct 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I display a custom variable as a text in an overlay?

So i'm trying to make an overlay that display your current health all the time. I have the script set up and everything, the problem is, I couldn't figure out how to bind the string variable that is set to my current health to a text box in the overlay. Every time I open the text box that should display my health, it only allows the "Fixed" option, (as in it's not letting me use any variables), and nothing else. Sorry if that was hard to follow, I can elaborate in the comments if you want.

Last seen on 15:18, 21. Oct 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know if it is…
Fri, 06/09/2023 - 04:25

I don't know if it is possible to display custom variables in overlays, although it might be. The workaround I have for this is using a actionbar thing by making it display the current health in an actionbar every player tick.