# How do I

Get help using Construct 2

### » Sat Jun 28, 2014 3:35 pm

Hi, I have an object with drag & drop (red square) and what I want is to clash with the black object and do not go to zone 1 ... like a wall or end of the layout.

how can I do that?
B
13
S
2
Posts: 297
Reputation: 1,717

### » Sat Jun 28, 2014 4:49 pm

Use the solid behavior
B
76
S
23
G
3
Posts: 673
Reputation: 9,348

### » Sat Jun 28, 2014 4:56 pm

does not work, I'm trespassing when using drag & drop with the mouse
B
13
S
2
Posts: 297
Reputation: 1,717

### » Sat Jun 28, 2014 5:05 pm

RedSquare.Y < ( is less than) (Y postion) > Redquare Set postion (Y postion)

Your (Y postion) is the number of your wall Y postion number.
B
76
S
23
G
3
Posts: 673
Reputation: 9,348

### » Sat Jun 28, 2014 5:13 pm

Try "if RED on collision with BLACK then RED drag_and _drop".
B
1
Posts: 1
Reputation: 127

### » Sat Jun 28, 2014 6:30 pm

gibus wrote:Try "if RED on collision with BLACK then RED drag_and _drop".

The problem is that I wish the black platform slides, the way you say cut the drag & drop

Try to do what he told me TheDom but lost me ...
CompareY: <Les than (457) example. You can explain it again or with an example
B
13
S
2
Posts: 297
Reputation: 1,717

### » Sun Jun 29, 2014 2:08 am

statham wrote:
gibus wrote:Try "if RED on collision with BLACK then RED drag_and _drop".

The problem is that I wish the black platform slides, the way you say cut the drag & drop

Try to do what he told me TheDom but lost me ...
CompareY: <Les than (457) example. You can explain it again or with an example

You have to add a condition to your drag and drop event that will only apply if your object is between a certain height.
This will cause your object to drop when it isn't in between that certain height.
This however will not slide your object from left to right as it will not be dragging anymore (constantly dropping).
What you can try is to put a condition that whenever you're dragging it beyond a certain Y position, the object will stay on a certain Y level.

I've made a quick example to show you how I've done it:
B
6
S
1
Posts: 73
Reputation: 571

### » Sun Jun 29, 2014 2:12 am

The file wouldn't upload because it's too small so it said it was "empty".
B
6
S
1
Posts: 73
Reputation: 571

### » Sun Jun 29, 2014 7:42 am

B
35
S
5
G
1
Posts: 169
Reputation: 2,765

### » Sun Jun 29, 2014 9:31 am

rezagamertag wrote:The file wouldn't upload because it's too small so it said it was "empty".

Thank you very much, it's just what I wanted I owe you one
B
13
S
2
Posts: 297
Reputation: 1,717

Next