Error with Mana Bar

Started by 2Cool4u on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Error with Mana Bar

HI, I made a mana bar but for some reason when I use an item that is supposed to consume the mana, it consumes the nbt value of 1 mana but the overlay doesnt show - 1 mana star. I set the first mana star to display only when the nbt value is greater than 1, than second is 2, etc... any help?

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
pictures of your work would…
Mon, 11/23/2020 - 22:26

pictures of your work would help allot :)

 

Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think I got it but there…
Tue, 11/24/2020 - 02:09

I think I got it but there had to be a better way to do it, ill send a photo one second.

Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The global variable when…
Tue, 11/24/2020 - 04:07

The global variable when specified for player only affects the player if I am correct, at least through the testing I've done. I may be wrong however.

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the variables are local to…
Tue, 11/24/2020 - 06:06

the variables are local to the event that effects the variable.

remember, there are times where you cannot use global variable of player like on entity attacked trigger.
The only way to update a global variable from a situation like this is to set the one of the triggers nbt data then have a procedure that will set your global variable to the local nbt data that you saved before.

Hope that made sense.

Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I understand, thank you
Tue, 11/24/2020 - 18:16

I understand, thank you