How do I

Get help using Construct 2

Post » 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?
Image
B
13
S
2
Posts: 297
Reputation: 1,717

Post » Sat Jun 28, 2014 4:49 pm

Use the solid behavior
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » 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

Post » 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.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » 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

Post » 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 :cry:

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 :P
B
13
S
2
Posts: 297
Reputation: 1,717

Post » 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 :cry:

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 :P


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

Post » Sun Jun 29, 2014 2:12 am

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

Post » Sun Jun 29, 2014 7:42 am

B
33
S
5
G
1
Posts: 163
Reputation: 2,698

Post » 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".
Instead I made a screenshot:
Image

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

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests