How to change label text in a GUI using a procedure?

Started by GregSmith on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to change label text in a GUI using a procedure?

I have a GUI that displays the current date and time of day, but I don't know how to make the GUI update, which can be achieved by changing the text of the label, via a procedure.

However, I have zero experience on this type of thing so please explain it to me like I'm five.

Any help is appreciated. Thanks!

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your going to have to create…
Thu, 10/06/2022 - 01:29

Your going to have to create a variable for each number. Day, Hour, Minute. Assuming you already figured out how to make the procedure for counting the time, that means you already have variables right? You can use the Text in a GUI to display variables. when you click on the Text button, click the drop-down list and find your Day variable, then put it on your GUI wherever you want. Then do the same with your Hour and Minute. make sure you use the Integer variable so you don't get decimal points. 

If you haven't made variables yet. I suggest learning how to convert your timers into variables. Then its easy peasy.

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have variables but the…
Tue, 04/09/2024 - 05:04

I have variables but the only option under the dropdown is fixed

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello, I need help, I am…
Thu, 02/27/2025 - 01:40

Hello, I need help, I am making a gui of an interface but what I want is that when I press a button on the interface the text of a label changes when I press the button, please could you help me with that procedure, please give me some example, I ask you.

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you have to this return text…
Thu, 03/13/2025 - 22:22

you have to this

return text:   create text with:   atrribute:   entity

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thats only for entities but…
Thu, 03/13/2025 - 22:40

thats only for entities

but you can put anything u want after {create text with} block