Why cant you put variables in overlays anymore?

Started by EnbyAkira on

Topic category: Troubleshooting, bugs, and solutions

Active 1 year ago
Joined Mar 2023
Points:
159

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
Why cant you put variables in overlays anymore?

i created a mod with a counter as a overlay and i accidentally upgraded to 2023.1 and there are no variable integrations in the overlay anymore

Active 1 day ago
Joined Aug 2016
Points:
3322

User statistics:

  • Modifications: 9
  • Forum topics: 63
  • Wiki pages: 20
  • MCreator plugins: 11
  • Comments: 2978
It has been replaced by the…
Tue, 03/21/2023 - 22:43

It has been replaced by the procedure system. You need to manually change your overlays and GUIs.

Active 1 year ago
Joined Mar 2023
Points:
159

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
thank you, but i cant manage…
Tue, 03/21/2023 - 23:04

thank you, but i cant manage to find out how to change it or where to find that option

 

Active 17 hours ago
Joined Feb 2018
Points:
1972

User statistics:

  • Modifications: 1
  • Forum topics: 161
  • Wiki pages: 0
  • MCreator plugins: 3
  • Comments: 784
@EnbyAkira If you open an…
Wed, 03/22/2023 - 18:10

@EnbyAkira

If you open an existing Lable or add a new Label in the Menu there you can choose the Text. You can click the Plus Icon or create a Procedure where you need to use the Text Return Procedure Block that you can find in the Category Logic! Then the Text.

After a Procedure with the Conditions above are existing you open a Label and select it by clicking the Arrow Icon right of the textfield.

Active 1 year ago
Joined Mar 2023
Points:
159

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
thank you very much!    now…
Wed, 03/22/2023 - 18:50

thank you very much! 

 

now i just need to find out, why the counters/variables are so buggy, it adds one when the player gets damage, but in a new world the first damage taken by mobs counts as two, and when the player dies the counter breaks even more :/

Active 17 hours ago
Joined Feb 2018
Points:
1972

User statistics:

  • Modifications: 1
  • Forum topics: 161
  • Wiki pages: 0
  • MCreator plugins: 3
  • Comments: 784
If you want to get the…
Wed, 03/22/2023 - 20:05

If you want to get the Amount of Damage in Overlay/GUI you need to put a "is provided world client-side" with a "not" Procedure Block.

The Attribute Attack Damage is Server side only. Or all Stuff related to Attack Damage is mostly Server Side only.

Active 1 year ago
Joined Mar 2023
Points:
159

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
this counter is part of a…
Wed, 03/22/2023 - 20:10

this counter is part of a challenge, where something happens, when the player gets damage, so it doesnt detect how much damage the player gets, just how many times he got hit

i already made it with normal NBT tags, but they reset, when the player dies, so i tried making it with global variables, but with them i have these bugs :/

Active 17 hours ago
Joined Feb 2018
Points:
1972

User statistics:

  • Modifications: 1
  • Forum topics: 161
  • Wiki pages: 0
  • MCreator plugins: 3
  • Comments: 784
Use Player Persistant Gobal…
Thu, 03/23/2023 - 08:13

Use Player Persistant Gobal Variables.

I'm making currently a new Plugin that adds a lot of new Procedure Blocks and Global Triggers.

Check the Feature List here.

Active 1 year ago
Joined Mar 2023
Points:
159

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
already tried that, sadly…
Thu, 03/23/2023 - 17:52

already tried that, sadly its the same bug :/

i guess ill just make it a keybind, so that the player adds to the counter manually

 

Active 17 hours ago
Joined Feb 2018
Points:
1972

User statistics:

  • Modifications: 1
  • Forum topics: 161
  • Wiki pages: 0
  • MCreator plugins: 3
  • Comments: 784
Also you want to have a…
Thu, 03/23/2023 - 19:51

Also you want to have a Counter in how many times the player takes Damage, right?

Active 17 hours ago
Joined Feb 2018
Points:
1972

User statistics:

  • Modifications: 1
  • Forum topics: 161
  • Wiki pages: 0
  • MCreator plugins: 3
  • Comments: 784
Also I wanna know if your…
Thu, 03/23/2023 - 19:56

Also I wanna know if your counter gonna reset over a time. Resets the Counter after amount of time passed or is this global and never resets in a world?

Active 17 hours ago
Joined Feb 2018
Points:
1972

User statistics:

  • Modifications: 1
  • Forum topics: 161
  • Wiki pages: 0
  • MCreator plugins: 3
  • Comments: 784
Here I tested for yourself a…
Thu, 03/23/2023 - 20:19

Here I tested for yourself a simple DamageCounter that increases if a Player takes Damage from any Source.

Make a Player Persistent Number Variable.

Then make a Return Procedure for your Label:

After that open the Label inside of your Overlay and select the Return Procedure.

Then make a new Procedure with the Global Trigger "Before entity is hurt". 

Make a local number Variable that automatically be set to the Player Persistent Number Variable.

Check if the Event/target Entity is the Player

Increase the local Number Variable by 1

And finally sets the Player Persistant Number Variable to the local number variable.

NOTE: Ignore the "Get local number Variable and increase by 1". Is a Procedure Block from the Plugin I mentioned before. It exactly the same like the you make the traditional way of increase it by 1.