How can I tumble blocks?

Get help using Construct 2

Post » Tue Dec 17, 2013 1:27 pm

Im making a puzzlegame with 32x32 blocks that are to be moved by (when selected by tapping it) when right is pressed it tumbles clockwise and thus moving 32 pixels to the right and vice versa when pressing left.

What is the best way to do this?
Anyone done something like this before?

Any tips and advice would be greatly appreciated!

Thanks.
B
32
S
10
G
6
Posts: 259
Reputation: 6,776

Post » Tue Dec 17, 2013 1:52 pm

One way to do it would be by spawning an object at it's bottom corner, the right corner when moving right and the left corner when moving left. Pin your 32x32 block to it and rotate the spawned object 180 degrees.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 17, 2013 2:15 pm

I found this one interesting enough to try and create:

Try here
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 17, 2013 3:12 pm

Thank you for taking the time!

That looks very nice :) Would you mind sharing the capx so I can study it?

Thanks again.
B
32
S
10
G
6
Posts: 259
Reputation: 6,776

Post » Tue Dec 17, 2013 4:23 pm

I upgraded the original tumblebox file, because it wouldn't rotate the image on the box properly, so hre is a link to the new example, the new capx and the original capx:

Upgraded TumbleBox

Upgraded.capx

original.capx
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 17, 2013 5:01 pm

Thank you very much! Ill look into it as soon as I have figured out how to make it so only the selected one of multiple boxes (by clicking on it) will move.
B
32
S
10
G
6
Posts: 259
Reputation: 6,776

Post » Tue Dec 17, 2013 5:34 pm

@MonDieu LittleStains solution might be more what you're looking for, but I changed it up a bit with physics and also made it so you can select which box you are going to use (and I think this solution is a bit simpler). The key here is the physic angular velocity on an object with the physics behavior.

here is the capx file
russpuppy2013-12-17 17:34:16
B
63
S
12
G
6
Posts: 456
Reputation: 8,981

Post » Tue Dec 17, 2013 5:55 pm

Thanx alot!

Looks like Ill use you selection function along with the other way to move the boxes
B
32
S
10
G
6
Posts: 259
Reputation: 6,776


Return to How do I....?

Who is online

Users browsing this forum: rayolf, Yahoo [Bot] and 7 guests