How do I check to see if path/route is complete ?

Get help using Construct 2

Post » Mon Apr 04, 2016 7:07 am

Please have a look at the following image (created in Excel for explanation purposes) :

Image

I have a 11x17 grid. No arrays, but done with sprites (each block indicates a sprite). The user needs to build a pipeline from side A to side B, by tapping on the blocks. Tapping on a block 'selects' it, changing opacity to 60%. Tapping again on the same block, 'deselects' it by returning the opacity to 100%. Once a path has been made with selected sprites from side A to side B, the user clicks on OK button, and the 60% opacity sprites are destroyed, thereby creating the path. Also, the sprites each have the solid behaviour set to ON.

What I need to do is to implement a check, before the sprites are destroyed, that the path is valid (as shown with the blue line in image). This check needs to pick up that the yellow line is not valid (due to the joint indicated in circle 1) or that the path is incomplete, as shown by the green line (circle 2).

The selecting/deselecting of the sprites I've mastered, as well as the destruction of the 60% opacity sprites. But for the life of me I have no clue where to even start creating a check as described above.

I would really really really apreciate anyones guidance or even just thoughts on how to tackle this problem.
B
6
S
2
Posts: 34
Reputation: 512

Post » Mon Apr 04, 2016 12:48 pm

Anyone?
B
6
S
2
Posts: 34
Reputation: 512


Return to How do I....?

Who is online

Users browsing this forum: 25games, Ashley, leotardozc, TRMG and 24 guests