[TUTORIAL] Display Custom Name on Entity GUI

Started by Kuroi Anji on

Topic category: User side tutorials

Last seen on 20:33, 28. May 2023
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] Display Custom Name on Entity GUI

First of all go to the Variables Section of Your Project on the left side. Then Create a Global Session Variable of type String

global_var

Add a text in your GUI and on the drop list select the Global Variable you have just created, they are at the bottom of the list.

add_global_var_in_gui

Now, create a Procedure for the Entity "On initial entity spawn" Trigger and in the Procedure Set a NBT tag variable whit an original name, use tag at the beginning, your mod name and a name that indicates the content of the variable. Then at the right set the value you want for your variable, in this case the custom name.

NBT_var_set

At last create a procedure that sets the Global Session Variable whit the value of  the NBT tag and opens the GUI on the Entity Trigger "When right-clicked on entity". On the first block drop list chose the Global Variable you made at the beginning, on the second the name you set for the NBT tag. On the second code block on the drop list chose the GUI where you set the label whit the Variable.

global_var_set

This is a way of doing it, the NBT tag value can the changed whit other procedures, it may have other uses

Last seen on 04:00, 30. Apr 2024
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you and your tutorial solved…
Fri, 04/08/2022 - 12:57

you and your tutorial solved my problems!!!!
thank you!!!!!!!!!!!!

Last seen on 20:33, 28. May 2023
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
this is good to know, you're…
Fri, 04/08/2022 - 21:17

this is good to know, you're welcome

Last seen on 20:33, 28. May 2023
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you can use the same gui for…
Fri, 04/08/2022 - 21:24

you can use the same gui for multiple entity whit this metod.