How do I create lego-type features?

Get help using Construct 2

Post » Sat Sep 05, 2015 12:09 am

Hi I'm trying to make a Lego style game and I've come across two problems I need help with.

When a block is placed it snaps to a Lego slot which is every 32 pixels on the x axis.

The two problems I have are;

Firstly, collision with the blocks I have placed. I don't want the blocks which are snapped into place to move when I'm dragging the other blocks around.

Secondly, how do I make the z-order go from bottom of the screen to the top (so the Lego peices don't show their connectors)

If you can help with either of these issues it will be greatly appreciated, thank you
B
7
S
1
Posts: 54
Reputation: 527

Post » Sat Sep 05, 2015 2:08 am

About locking blocks I would use instance variables to keep track on which blocks have a block on top of it etc.
Image
B
14
S
4
Posts: 145
Reputation: 1,948

Post » Sat Sep 05, 2015 2:51 pm

I have found a solution for the first one however it isn't very efficient.
I made a variable grounded and whenever a block collides with ground it triggers grounded.
Grounded variable just sets the blocks physics to immovable.
Not a perfect way of doing it really.
B
7
S
1
Posts: 54
Reputation: 527


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 12 guests