How do I check if all objects in a family are connected?

Get help using Construct 2

Post » Sat Jul 04, 2015 2:29 pm

So I'm building a game where the player can drag and drop ship components onto a grid to design their own ship, but I'm having trouble running a check to make sure that all the components are connected as a single ship.

Currently I've got a check to see if each ship component is overlapping with another ship component offset in each direction by the size of the grid, which works for finding stray cells of the grid which are filled, but doesn't for two groups which are not connected.

Anyone have any ideas as to how I can check if all the filled cells of the grid are joined as one?
B
3
Posts: 7
Reputation: 189

Post » Sat Jul 04, 2015 10:51 pm

B
55
S
29
G
19
Posts: 1,520
Reputation: 25,630


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Allardje, R0J0hound, Rudi55, sublimate, Vinterstille and 1 guest