a problem with less than and greater than symbols in godot 4 beta 11?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By a programmer

I have the script:

if  started_falling > started_falling + fall_before_dead:
      print("dead by falling")
      kill()

I know that both the started_falling and fall_before_dead var’s are right so I think that it might be a godot 4 error not an error made be me?

What is problem here? You didn’t actually say what you expect to happen or what is actually happening.

I will say that the only way for those print() and kill() statements to ever be called with that logic would be if the value of fall_before_dead is negative. Is that the case here?

jgodfrey | 2023-01-18 00:48

yes, but you die instantly then. if it is positive then you never die.

sorry for not explaining properly

a programmer | 2023-01-18 00:55

I still don’t understand what you expect to happen or what you think is wrong. Why do you think there’s something wrong with > and < in Godot 4 (which there, almost assuredly, is not)?

jgodfrey | 2023-01-18 01:54