Quantcast
Viewing latest article 17
Browse Latest Browse All 65

Answer by CaKeMeaT

the problem with greater-or-equal-than opertaions is that they can be pass as true even when you expect the later conditions to trigger instead. ammobar.GetComponent(UI.Slider).value <= 100) will almost always be true it seems. and your second if statement only allows you to check for >= 75 when you've already checked if your value is <= 10. So for example, your 'Value' is 40, first IF is negative, so your nested if doesn't check

Viewing latest article 17
Browse Latest Browse All 65

Trending Articles