Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | unifyzero |
Hey all, hopefully this is an easy one… I’m messing around with visual scripting and found something odd. I’m wondering if this is a bug, or if I’m just overlooking something.
What I’m doing: I’m using a “Compare Greater Equal” node and then assigning the resulting bool to the “disabled” property for a button.
The problem: the bool doesn’t switch until my A value is greater than my B value (i.e., it remains “false” until A is 11 with B set to 10).
Amplifying Information:
- both A and B are ints.
- Using the print function I can verify that the bool is not switching until A is greater than B.
- if I use a “Condition” the bool switches correctly (i.e., it changes to “true” as soon as A is 10 or greater with B set to 10). See examples below.
- I’ve tried running the script under the “_process” function and as a button press with the same results on both.
- I’ve tried setting the B value straight from the node and setting it through a variable with the same results on both.
- I’ve tried the same thing using GDScript and had no issues.
- Just realized I should’ve been using “Compare Less Equal” node, so I switched over to it, and still having the same issue. Even stranger, “Compare Less Equal” doesn’t trigger until A is greater than B even when filtering it through the “Condition” node.
This does not work
This does work