[SOLVED] displaying variable maximum value in a gauge using srd hud maker

Hi! I want to create a gauge that displays a variable using SRD HUD Maker, but I don't know how to display the variable's maximum value! i tried searching on the site and what i saw didnt worked!!

1744068216301.png
1744068284569.png
1744068340340.png
Variables don't have maximum values, they just store the information you put in them. So, what are you storing in this variable and what would you like to do with them? What is the point of showing it as a gauge as opposed to a number? If you can give more details about what you want to do, people might be able to help with it.
If the max value is just the number 3 you can just put 3 in the field.
If the max value is just the number 3 you can just put 3 in the field.
i tried it and it didnt work! is there a way to set a condition like if variable(7) is equal to 3 via scriptcalls?? i tried with $gameVariables.value(x) === y and $gameVariables.value(x) == y
i tried it and it didnt work! is there a way to set a condition like if variable(7) is equal to 3 via scriptcalls?? i tried with $gameVariables.value(x) === y and $gameVariables.value(x) == y
I just tested it myself and you can put static numbers in one or both of the current and maximum value fields.

You cannot put a conditional check in a field expecting a number. I'm not sure what you're even trying to do.
i tried it and it didnt work! is there a way to set a condition like if variable(7) is equal to 3 via scriptcalls?? i tried with $gameVariables.value(x) === y and $gameVariables.value(x) == y

As @AquaEcho said, you can put a static number there and it will work, but then there's the issue of your variable potentially going above the max value you set to consider. I haven't tested that, so I don't know how it would react to that situation. I also don't understand why you're trying to use an if statement in there. If you can explain what it is you're actually trying to do, you'll get much better help.
I just tested it myself and you can put static numbers in one or both of the current and maximum value fields.

You cannot put a conditional check in a field expecting a number. I'm not sure what you're even trying to do.
thank you!
As @AquaEcho said, you can put a static number there and it will work, but then there's the issue of your variable potentially going above the max value you set to consider. I haven't tested that, so I don't know how it would react to that situation. I also don't understand why you're trying to use an if statement in there. If you can explain what it is you're actually trying to do, you'll get much better help.
is there a way i can link that static number to a variable? how could i make it change? The idea of counting this variable using the gauge was for aesthetical purposes, i wouldnt like it to be just a number. I am working on a game where there is a specific variable that keeps adding to itself and i wanted to show that progress, theres no way the variable can go above the max value.
is there a way i can link that static number to a variable? how could i make it change?
You don't make a static number change. If it changes then it's not static, its dynamic. You would use a separate variable in that field, e.g. $gameVariables.value(8).

But your description sounds like only the current value is changing and the max doesn't, so the max should be a static value?
@caratulin_porotin

The thing is, variables don't have a max value on their own. They can only have a max value if you restrict it to have a max value through eventing, scripting or plugins. You can put a static number as a restriction in which case there's no reason to put that into a variable. If you are going to change the max value, then you do what AquaEcho says and put it into a separate variable, but then the issue becomes how are you changing the max value throughout the game? Because you cannot do that inside of the HUDmaker box.

​

To be specific, the control variables hold one integer (whole number) value by default. If you want a dynamic minimum value and a dynamic maximum value they would have to be two separate control variables.

Now, yes, technically you can change this if you use the script field when you assign a value to a control variable, and make it hold any amount and type of data you want, but don't do that unless you are comfortable with scripting, which if you were there would be no need for this thread. You would also have to then use scripts to reference or change the value in that variable instead of event commands.
@Nox_Aeternae @AquaEcho
Thank you both so much for your patience and for explaining it to me! It was a great help in understanding how it worked. I managed to get the result I wanted. It turns out I was putting the values inside ${}, since other HudMaker functions ask me to do so, but apparently not this one.
@Nox_Aeternae @AquaEcho
Thank you both so much for your patience and for explaining it to me! It was a great help in understanding how it worked. I managed to get the result I wanted. It turns out I was putting the values inside ${}, since other HudMaker functions ask me to do so, but apparently not this one.

${} is Hudmaker plugin's way of knowing whatever's inside those brackets is code. If you're just going to use a static number, you don't need it.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-displaying-variable-maximum-value-in-a-gauge-using-srd-hud-maker.176818/