How to test for the same variable from multiple objects in one event?

I want to test if a sprite with a variable string is in collision with the player, for example, the enemies have a variable called “Moral” with the data “Bad,” if “Bad” touches a sprite with any other variable than that, it would take damage, what if I want this to work for all sprites with that variable instead of repeating the event?

Hello, ValenCreates

If I understand your question correctly, you can just create an “Object Group” and put all the objects you want to have their variables checked in it and use this group in the event.

Creating Object Group:

Choosing the Object Group in events:

1 Like

That’s really useful, thanks!