Pick the right instance

Hello,

Still struggling with instance picking.
I have a player object with a single frame.
In order to avoid duplicating objects to make icons, I wanted to create an second instance and use as an icon somewhere else on the screen.
Therefore, I have a group of Players and a group of Icons containing the same “Player0, Player1, Player2, Player3” objects.
Issue is that when I make changes on the icon, it impacts also the player object :frowning:

How can ensure that changes are applied only to object picked through the group Icon?

Do the groups Players and Icons contain the same objects? If they do then you need to use separate events otherwise the 1st object will still be selected when the size is changed the 2nd time. Using a group is just like using the object names.

image

creates
image

Ok got it. Thanks a lot. This is key.
I also noticed that the reference is used in any sub-events.
i.e. if I want to pick all objects of a group, I’ll get only 1 if in a sub-event with an object created previously in the parent event.

Yes, sub events inherit or continue to use the pick list of the event they’re a sub event of. The term seems to be main event for the first event and then each sub event would be a sub event.

https://wiki.gdevelop.io/gdevelop5/interface/events-editor/#add-a-sub-event

It can get confusing. Each indentation uses the previous list and its conditions are like filters and they create a new list for the other conditions and actions.

As the app execution returns to previous levels or indentations the previous list is used until you start a new main event with a completely fresh list and start all over again. It’s very important to pay close attention to the indentations.