Hi again :
So, I'd like a function which swap every object having "variante = 0" in the decoration family with other objects in this family which have the same name (each door have a variable 'name' = 'door' and same for the trees) and "variante = 1".
The purpose is beeing able to switch a lot objects with a single function (for example, if I have 50 regular objects and 50 "alt" objects in decorations family...).
I tried some things but I didn't managed to do it.
I think I'm moving toward a solution. I used the container functionnality. Each element is linked to another element. These two linked elements are on different layers but have the same position. I'll prevent the game to interact with objects on this background layer and I just have to create a function to make them switch their layers, which should be not very difficult.
The moving background A is linked with the red shape B via the container functionnality. They both have the same X Y coordinates.
The green tree J is linked with the blue tree K. They also both have the same X Y coordinates.
A and K are on the background layer. They could be invisible too. When I interact with the drag'n droppable grey square, I collide only with the elements on the front layer.
So, that's it : if I'm able to swap the element layers, that should do the trick. Sorry if my explanations are bad, I'm not that good in english.