Yes, this title is a ride.
I can admit that it’s kind of a hack, because GDevelop doesn’t handle Behaviours with groups natively, so i know i’m going on the edge. But still : i think there is a problem.
If you have two sprites in a group, one with a Tween behavior, and the other not, if you test the “Tween is finished” event with the group, it will pick both sprites. Yes, even if the second one doesn’t have the Behaviour, they are still picked together.
Expected behaviour: only the objects with the required behaviour can be picked.
Test project: download zip
Repro steps on the project:
- Preview the project
- Left click
- Right click
- Now you have 3 objects with one not having the Tween behaviour
- Press space
- Two objects move
- The top text says 3 objects have been picked by the “On tween finished” event.
Expected result: the text should display 2 objects only
Workaround: If all the objects have the behavior, the picking is made correctly.
I tested it and yes, it shows a count of all of the objects. IDK if it’s a bug or not. Objects are sort of picked by default without any conditions and without the needed behavior they can’t be tested by the tween condition, so they remain “picked”. Again, IDK if bug.
I tested the same premise with the pathfinder I added the events under the object name and then after it was added I changed it to group. Now, maybe that part shouldn’t allow it to be changed to a group where all members don’t have the needed behavior or at minimum could underline it and show an error. As in your example, 1 object had the pathfinder and the other didn’t. The reach destination shows 2 objects being picked. I’m assuming the same would happen with any pairing of objects without the needed behavior.
Oh i’m sure it’s not a random effect. I’m presenting my usecase but i’m sure that’s how GD works actually.
And it’s a nonsense for the users. Something shouldn’t happen if it doesn’t have the required stuff.
From what i understand, it means that instead of being selected, objects are being discarded regarding to the conditions, so the ones that doesn’t have the Behavior are kept in the bag.
Agreed. When you change the object name outside of where you create it, then maybe the group should not show as an option if each object in the group doesn’t have the behavior for the condition or action.
Filters are a big issue for autocomplete lists in GDevelop. It’s way bigger than that. See, for now when you want to change a boolean variable it also shows numbers etc. so it’s a big topic.