- Home /
Adding values to a slider, need help.
void Start () {
hungerslider.maxValue = maxHunger;
hungerslider.value = hunger;
thirstslider.maxValue = maxThirst;
thirstslider.value = thirst;
fatigueslider.maxValue = maxFatigue;
fatigueslider.value = thirst;
}
EDIT:
Problem solved.
I see. By "making the sliders show how much the values are", do you mean having the sliders be at the correct values constantly? If so, you just need to put the code you had above in the Update function.
That last line sets the fatigue slider's value to thirst, rather than fatigue. Also, what are the error messages you're getting?
@Tespy I changed the thirst to fatigue (Stupid mistake). The error message whas that I forgot to put the drag the sliders to their script bar or whatever you want to call it. (It doesn`t matter, just another stupid misstake)
This is how the orginal script looks finnished. This work as it should. The problem is that I dont know how to make the sliders show how much the values are.
I see. By "making the sliders show how much the values are", do you mean having the sliders be at the correct values constantly? If so, you just need to put the code you had above in the Update function.
Your answer
