How do I detect overlap on drop?

Get help using Construct 3!

Post » Thu Jul 27, 2017 8:32 pm

This is simple: I have two instances of the same, draggable object. Once one instance is dropped on another, both should be destroyed.
I came up with this:

Image

But it does nothing.
Once I change the main condition to "TestSprite -> on Collision with TestSprite" it works. If I remove the "on drop" condition leaving only the "TestSprite is overlapping TestSprite" it also works. The problem is I need this to work specifically on drop. Help!
B
16
S
7
G
1
Posts: 161
Reputation: 3,131

Post » Thu Jul 27, 2017 11:12 pm

'On drop' Adds only that 1 dropped Sprite to the 'PickList'.
All following conditions start picking from that 'PickList'.
Hence, 'Is overlapping' can not find any other Sprite besides the dropped one, only the dropped Sprite is 'Picked'.

Use a Family. The preferred method.
https://www.dropbox.com/s/v0r58igttb5vl ... .capx?dl=0

No money for Familys ? Use a helper object.
https://www.dropbox.com/s/jn3ixy6q9x61f ... .capx?dl=0

Or, use logic. Each sub level has its own 'picklist'.
https://www.dropbox.com/s/7irftk5te4vn5 ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jul 28, 2017 10:01 am

@99Instances2Go

That's great, thank you. For various reasons I now need to have the same objects in two families with duplicate instace variables but it works very well.
B
16
S
7
G
1
Posts: 161
Reputation: 3,131


Return to How do I...?

Who is online

Users browsing this forum: mekonbekon, Waltuo and 1 guest