I'm trying to make a sort of match-3 style game using physics. So, there will be a number of coloured boxes falling from the top of the screen and you can smash them into each other and when they do, similarly coloured boxes stick together and when you have 3 or more boxes, they will disappear or do something.
I tried making a "when box collides with box" event then having a "make a hinge between box and box" action, but it doesn't work. Is it getting confused at which box to make a hinge to? How do i differentiate the collider and the collid...ee?
Also, i'm curious as to how i'm going to link the boxes together so i can perform some sort of action on them. I noticed the ObjectPairer object and tried looking up some info on it, but found none. Can someone fill me in on how that thing works and also let me know if it will help me in my endeavours?
Any ideas will be much appreciated.
EDIT: Okay, well i found a way to make the hinges work.
The box object is now the member of two different families and when i do the events and actions, i make sure to use the opposing families. For example, in the event i put "when family1 collides with family2" then in the action i put "make hinge between family1 and family2".
Now that the boxes lock into place with one another, the question is: does this mean that hinges keep getting made on every step? Is this going to cause some sort of memory leak?