[SOLVED] Same event to many objects

Hi, Is it possible to make a condition for several objects, without needing to be repeating the event?

It looks a bit ugly and optimal to have about 9999999 events just to check collisions on each object in the same way

I want to do something like an array or something: if in the group of unique objects (z, s, f, q, s, r, y, t, e, h) Any object of these collides with the object “XXX” then do angle rotation.

Try this: For Each events [GDevelop wiki]
:slight_smile:

But does that only allow me with a single object or am I wrong? What I don’t want is to have to copy and paste repeated events to condition other objects similar to this. I have a list of objects that will do the same thing

Have you tried the object groups?
You add an object group, and you put all your objects to be tested in it.
Then in the condition you call not one object at a time but the group.

http://wiki.compilgames.net/doku.php/gdevelop5/objects/base_object#object_groups

thx mate!!! that’s what i was looking for

1 Like