UI reacting to a variable

Started by LordGael22 on Tue, 06/11/2019 - 12:33

Topic category: User side tutorials

Last seen on 18:55, 25. Jul 2019
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
UI reacting to a variable
Tue, 06/11/2019 - 14:23 (edited)

 Hello , i'm here because I don't know how to make my UI react to a number variable , I have the idea :

It's for a mana gauge , and I think do like if "mana" varibale (number) have a certain number (like 1) change the picture of the UI , and if the number is higher just make like the mana gauge is fulling but I don't know how to do it on mcreator , I have created the variable and the UI but in the UI procedure pannel it is said I can't use variable for it . The aim is to change the picture of the UI in relation with the evolution of the variable .

 

Thanks you .

 

Edited by LordGael22 on Tue, 06/11/2019 - 14:23
Last seen on 14:32, 22. Aug 2019
Joined Apr 2010
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
  • developer
We plan to add proper …
Tue, 06/11/2019 - 18:17

We plan to add proper "progress bar" like components to the UI in the future updates.

Last seen on 18:55, 25. Jul 2019
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
So what I planed is…
Tue, 06/11/2019 - 20:23

So what I planed is impossible to do for now ?

Last seen on 23:33, 19. Aug 2019
Joined Feb 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
No, it is possible, it just…
Mon, 07/01/2019 - 19:07

No, it is possible, it just needs a little bit of coding because it seems that MCreator doesn't accept it, but the code and the game still do. So going into the code and forcefully putting in the variable and saying under which circumstance your different UI representations of the different amounts of mana you have are going to appear is enough.