UI reacting to a variable

Started by LordGael22 on

Topic category: User side tutorials

Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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
Joined May 2015
Points:

User statistics:

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

So what I planed is impossible to do for now ?

Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Joined May 2015
Points:

User statistics:

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

Ok , thx mega , I'll try that .

Joined Jan 2017
Points:

User statistics:

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

and ima use this idea and code it into mine lmao