Very simple example here. When run it shows error
I tested it and the results also vary by the order of the conditions. I donât fully understand [NOT]. I donât think you can use multiple values within a single [NOT] Iâm not sure what logic Gdevelop is using.
The method to get what you and I expect is using [NOT] with the values in an [AND]
what is the use for âif all these conditions are trueâ ? Isnât it already implied ? All this doesnât make sense at all.
actually Iâm guessing the use of âall these conditions are trueâ is within a OR condition.
Anyway, I would like to know why my simple example gives âerrorâ. The inversion of 2 conditions is not working. Itâs weird because many codes use that. I wouldnât be the first to have had this bugâŚ
âNotâ behaves different than some would expect, because itâs looking for the inverted âlogicalâ result, not the inverted âresultâ.
Itâs in the wiki somewhere but I donât have availability to look right now. Just know that it isnât exactly the same as a âNOTâ in a programming language. In most cases you would want to just right-click and invert the condition instead for the equivalent of that.
I agree with youri. The NOT expression or condition doesnât work correctly. Why would the order of the conditions matter? Either itâs broken or itâs using some other criteria. The only reliable way to check for multiple conditions seems to be either use NOT on an AND or separate NOTs for each one. The invert works as a replacement sometimes but not always. (especial when used for instances)
Using these lines, the first 2 events should both either be true or both be false.
result:
Edit: Iâve tried understanding the NOT, AND and OR. When using multiple instances, it sometimes gets weird but there usually is a method to the madness. Sometimes, youâll get the same true vs false result but the instnces thenselves arenât always âpickedâ and you need a pick all
Apologies, I was reading this late last night and somehow misread it was object variables, not global variables.
Order shouldnât matter in this case. Iâm unclear why it does.
The issue is reproduced with automatic tests and this PR fixes it. The fix will probably be in the next release.
Thank you all for investigating this.
My conditions werenât even yours. Mine were 1=1 and 2=2 , both true.