[Solved] "invert condition" isn't work properly? how work instances and multiple objects?

I’ve solved same problem here :


Let’s go back to basics :

  • An object is: An object that you create in the object list.
  • An instance is: When the object is on the scene (One time or multiple time ).

The event sheet simplifies things by talking about objects. But basically it works with instances.

When you put the object in a group. And that you call the group.
What is used by the engine is the list of instances.

The event sheet contains a kind of selector in the game engine.
When you call a group, this selector will contain a list of instances of the objects present in the group.

Your condition is “if the cursor is on group XXX”…

If you have understood correctly, this will select a list of instances of the object in the group.

The game engine will take the instances one part one and test the condition.
Is the mouse on instance A? Yes, we do the rest of the events.
Is the mouse on instance B? No, we stop, we’ll see the next instance.
This for each instance…
You have invert the condition. So the game engine will understand Yes by No and No by Yes. This doesn’t change very too much.

The engine will then check if all the results are identical for all instances.
As there are Yes and No’s the engine will refuse your condition.
And there for you it doesn’t seem to work you said this is a bug. For the engine everything works well, the game engine is happy with it :slight_smile:

What you need to tell the engine is to check this action for ALL instances.

So create the event “For Each” , this is a loop.

The event will display “Repeat for each XXX object”.
XXX is your group.
Then you put the actions in under event.

In few words :
If an object is present only once on the scene (Only one instance) then it is useless.
If there are several instances of the object on the For Each scene is mandatory.


More info on groups:

A group of objects allows you to put several objects (a sprite object and a text object for example) in the same list (Group).
This group of objects is understood by the game engine as a list of instances of the two objects on the scene.
if you have on your scene 3 sprite from the object A, and 2 Text from object B
The group is like this :

group = [sprite, sprite, sprite, text, text]


I hope I didn’t say anything stupid or wrong in my explaination ^^

1 Like