I have a sprite named SpriteX. When it overlaps with the same instance of SpriteX, I want to perform a certain action. In this case, I want to set its position to the first instance of the sprite where it overlapped.
To achieve this, I have assigned a boolean variable to SpriteX, called Draggable_Boolean. Based on this variable, I have selected the desired sprite where I want to perform the action by adding an instance variable called "A" to it. Additionally, I've created a family called SpriteX_Family and assigned an instance variable called "B" to it.
In the comparison logic, when A equals B and the sprites overlap, I intend to set the position of SpriteX to the SpriteX_Family. However, this approach is not giving the expected results. This is where I need assistance.
Please take a look at the attached .c3p file for further details.
easyupload.io/2f39z4