UI reacting to a variable

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

Topic category: User side tutorials

Last seen on 17:19, 2. Dec 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
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 17:19, 2. Dec 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 17:02, 6. Dec 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.

Last seen on 17:19, 2. Dec 2019
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Ok , thx mega , I'll try…
Fri, 09/20/2019 - 15:16

Ok , thx mega , I'll try that .

Last seen on 00:59, 3. Dec 2019
Joined Jan 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
and ima use this idea and…
Fri, 09/20/2019 - 15:19

and ima use this idea and code it into mine lmao

Last seen on 17:02, 6. Dec 2019
Joined Feb 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
ol/
Sun, 09/29/2019 - 15:43

ol/