>= in if statement not working?

Godot Version

4.3

Question

Why does my if statement not work? If i understand correctly - else should trigger if HPp1 is equal to 0 or greater then 0. But when variable reaches 0, “if” still triggers, not “else”. Is it a bug?

You misunderstand, I’m afraid. else triggers if HPp1 is lower than zero.

Cheatsheet:

Symbol Meaning
<= smaller than or equal to
>= bigger than or equal to
< smaller than
> bigger than
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.