Problem about testing value of objet variable in GDevelop 5 bêta 96

Hello all,

You will find below all the french conversation to date translated in english and concerning an error i think to have found in my game about testing value of objet variable. I precise that i reported this today in french forum, so that is the reason i translated my post in english to have an wider audience of this problem and the opinion of others members of this forum.

Hello all,

I hope that I am in the right section to indicate what I think is a bug although it seems to me however very surprising that this kind of dysfunction can still occur in Gdevelop, a software that is now more than 10 years old.

I will describe the problem I encounter with the images of the events in question.
I have 1 text variable for a global sprite object. At the beginning of the scene, I value this variable with the letter “D”.

At some point, I test if the condition is “D” in addition to a scene variable (= to 4?) and curiously, the test on the 1st condition returns FALSE!

I really don’t understand why this is doing this!

I would point out that by using a text scene variable instead of object variable, it works very well. So I can get around it.

Am I in the presence of a Gdevelop bug?

Thank you in advance for your returns.

I specify that I am on Gdevelop 5 last version (beta 96) and I have only one Avion_global object for which I created the variable “Direction_avion” beforehand.



The condition “If all of these conditions are true” is not necessary here, try without it.
Also it is difficult to say without having the game itself whether it is a bug or not, because it is possible that index_Path_Node is not equal to 4.

I advise to create a blank game, reproduce the error case, and send it to the forum. If it turns out that the condition does not work, then the error can be corrected.

Thanks, Florian, for coming back.
I had of course tested with and without the condition “If all of these conditions are true”: the result was of course the same (cad: Not OK because the (partial) condition “the text of the variable Direction_avion of Avion_global” also returned FALSE)
As for the condition concerning the scene variable “index_Path_node” and as I indicated in my last screenshot, I confirm that the scene variable “index_Path_Node” returns TRUE when its value reaches 4: indeed, by deleting the condition “the text of the variable Direction_avion of Avion_global” which returns FALSE, the result of the condition is TRUE (i.e. “the text of the variable Direction_avion of Avion_global” → TRUE) because the corresponding action “Rotate Avion_global at speed -145deg/second” ( or any other action I indicate) is executed.

But I repeat, I find it is hard to believe that I could find a bug in Gdevelop because I can’t imagine to be the first and only one to use to date a variable of type text assigned to an sprite object and for which the test of value would’nt work.

I am waiting for your return Florian as well as those of the others software contributors but also of other members of this forum to discuss more.
In order to have wider audience of this possible anomaly, I will soon post this message translated in english.
I will also prepare and submit to you an example of a GD source where the strict necessary will be indicated in order to highlight the possibility of such an anomaly that I have noticed but for which I am still doubtful of its true existence.


What do you thing of that?


is Avion_Global already in the scene at the beginning (when variable is set) and when index_path_Node reaches 4?
i just tested it with your setup, works perfectly. there is something else not working.
try an event that changes a textobject to the variable ob the object when mouse/touch is over it and see, if the D is showing up

Problem analyzed and solved!

DO NOT, as Florian told me, put the condition “If all of these conditions are true” otherwise it will not work (?)
I just tested right now on a new stage created for the occasion and it works now.
We must therefore have this:

and not that:

I admit that I do not really understand why this does not work when we add the condition “If all of these conditions are true”!
Florian or someone else could-he clearly explain to me why it does not work when one uses this condition which should nevertheless do the job for which it was designed otherwise I do not see too much the interest and usefulness of this condition which must certainly confuse more than one The beginners on Gdevelop?
Thank you in advance.


It should work though because who can the most can the least, right?
In any case, this makes me doubt the proper execution of the condition “If all of these conditions are true”

There’s a somewhat similar “non-issue” with the OR, I assume the underlying logic is the same.
If you add objects-related conditions under these advanced conditions, like your “Avion_Global”, those objects are… “deselected”, somehow. That’s why switching to a scene variable fixes it.

Yes, i agree but i am not able to think that it is normal! As said on french forum where i originaly created a post on this topic, i am going to do a simplicist game to uplight the dysfonctionment of the condition “If all these conditions are true”
In the case of proven problem with this condition, i think the best thing to do will be to delete this condition of GDevelop then communicate on this suppression in direction of the GDevelop users: less time to delete it than correct it to work, because Florian said that instruction is very few used by GDevelop users.

On its own, it’s useless, but it is quite handy with OR conditions.
Here’s an example:

As Gruk mentioned, the “& If all of these conditions are true” condition is predominantly designed to be used within the “|| If one of these conditions is true”

It’s basically designed to let you do this:

If one of these conditions are true:
 A (or)
 B (or)
   If ALL of these conditions are true:
     C (and)
     D (and)

This way you can basically have 1 condition that says “Do this if A or B or (C AND D) are true”

I understand well but in this case, i think it would be very usefull to precise or communicate that on the Wiki documentation.

Thanks to all.

I remember adding this to the wiki forever ago, but I needed to check to make sure I wasn’t misremembering.

First tip box here. Advanced conditions [GDevelop wiki]

1 Like