When I execute this logic, it only goes into the last two conditions. Is there any error that I'm not seeing?
You need to add an Else on those conditions. Without this it quickly checks if var=0 then sets to 1, then checks if var=1 after it has set it to 1, so each one is true.
Develop games in your browser. Powerful, performant & highly capable.
Hi. The answer above is correct.
Here are two great options.