how to compare duplicate sprites in expression

Get help using Construct 2

Post » Mon Oct 28, 2013 7:38 am


I am new to construct2 and I am trying to implement a swapping feature between a same sprites objects which i have duplicated on the layout. The sprite is a white box with dragdrop behavior , there are 5 duplicate white boxes which can only be drop on yellow boxes. Yellow boxes are like a place where white boxes can be drop rather than any place on the layout.

Now suppose if a white box is already dropped and placed on yellow box but still user drop the second white box on the same place then i want to swap the positions of each other on yellow boxes. Problem is when i use this condition

SpriteA is overlapping SpriteA
SpriteA is overlapping SproteB
      Action: SpriteA: Set Position (SpriteB.X,SpriteB.Y)

doing that it returns me back to the SpriteB rather than setting this sprite on the other duplicate object of SpriteB.

In simple words i need to swap their positions if one them comes near while other is already on the place.

Please check my sample for detail ,

Posts: 108
Reputation: 1,010

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 16 guests