How do I make dragable objects snap to grid

Get help using Construct 2

Post » Fri Apr 04, 2014 8:20 pm

It's still broken, but the logic makes sense to me, but I'm obviously missing something. I would love some advice on how to get it working.
B
12
S
5
G
3
Posts: 10
Reputation: 2,416

Post » Sat Apr 05, 2014 11:31 am

Here is an example of how to do it. Its not a fully working example, but just shows the principles of how you do it. So you can drag boxes from the bottom container to the scale and they will switch position. But dragging from one container to another container will not make them switch position. Same goes if you drag from the scale to a container. So always drag from a container to the scale or return the box from the scale to an empty container in the bottom first.

However you can add all these things to it if you want.
You do not have the required permissions to view the files attached to this post.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Mon Apr 07, 2014 6:01 am

Thank you Nimos100! Your example helped loads, and with some tinkering and tuning I got it working the way I wanted. I've attached my capx.

SortingPrototype.capx

Seems like there is no bugs currently and is as optimised as I can make it.

Thanks to everyone for their help, onto the new stage of development, animating!
You do not have the required permissions to view the files attached to this post.
B
12
S
5
G
3
Posts: 10
Reputation: 2,416

Post » Sat May 17, 2014 6:04 pm

Thanks guys!
I was searching for how to best implement a snap feature and this post helped me to understand a lot more about how to do this with c2.

Cheers,

v :)
B
14
S
4
Posts: 190
Reputation: 1,735

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests