How do I prevent from dragging underneath object

Get help using Construct 2

Post » Thu Jul 20, 2017 3:46 am

I have a object with Drag&Drop, and I can "take" even if it is underneath another object. So even if I have another object above him, and I am not seeing him, I can drag it.
I would like to make impossible to drag the object if it is underneath another object. And if it is underneath another object but I can see just a part of him, I would like to drag the object only if I click in the part that I can see.

I hope I could explain it right. There is a way to do it? Can you point me what I should do?
I appreciate any suggestions : )
"Do what you must" -The Elder (Titan Souls)
B
27
S
12
G
4
Posts: 62
Reputation: 4,187

Post » Thu Jul 20, 2017 7:20 am

@Fenix18

Is working good for me here as longs both objects have the Drag & Drop behavior, I couldn't manage to reproduce your error, so from this I assume the top object hasn't got Drag & Drop behavior because is when I noticed it's happening.
so I have been playing with it and looks like a bit tricky, I manage to do this but I'm not sure if it will help you, I'm sure some one else can do it a lot better.

The top object "blue" is the one that doesn't Drag

https://www.dropbox.com/s/h6sfa9a6r5zxfc8/DragTopInstance2.capx?dl=0
B
38
S
22
G
64
Posts: 242
Reputation: 36,072

Post » Tue Aug 29, 2017 1:23 am

Hi @tarek2.
Thanks men, and sorry for the late response, I am back now.
This method didn't work right in my game, but you gave me the theory I needed, I will work on another way of doing it.
Thank you, be blessed ; )
"Do what you must" -The Elder (Titan Souls)
B
27
S
12
G
4
Posts: 62
Reputation: 4,187


Return to How do I....?

Who is online

Users browsing this forum: yiuyiu6666 and 23 guests