Hi everybody
I’ve made a script which displays 2 bars, the current and the maximum health. But I want to make it impossible for the current health to exceed the maximum health. I tried to use this script
var maxhealth = 100;
var curhealth = 100;
function Update () {
if (curhealth < maxhealth) {
"maxhealth" == "curhealth";
}
}
But when I assign the value of 60 to the current health and 50 to the maximum health, those values don’t change into 50 current health and 50 maximum health. Does anyone know what mistake I’ve made in my script?