How do I make this puzzle system thing?

Get help using Construct 2

Post » Mon Apr 10, 2017 6:31 pm

Message: Piggly can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hello
I was trying to do something that I though it was easy, but it seems like it is not :(

It's a puzzle system, something a little bit similar to the hacking puzzles of bioshock. Take a look at this .capx to see what I'm talking about:
https://goo.gl/kqHXFK (I had to shorten it.. but it's a dropbox link)

My difficulties are:
-How can I make the pieces of the puzzle spawn with the same layout that I manually made? Maybe something with loops, but I could not manage to do it.

-How can I use the arrows to navigate through the pieces? And if, for example, I tap the right arrow with the last piece to the right selected, it will be back to the first piece of the 'column'.


Sorry for the english. But for now, that is my doubts.
Thank you.
Last edited by Piggly on Mon Apr 10, 2017 6:35 pm, edited 1 time in total.
B
6
Posts: 21
Reputation: 292

Post » Mon Apr 10, 2017 6:34 pm

I can't see the capx but when you say Bioshock Hacking minigame do you mean a Pipe puzzle?

I've seen a capx scattered around here somewhere using tilemaps but I don't know if it still works.
I guess the challenging part would be getting that flowing water animation part to play.
Image Image Image
B
29
S
11
G
27
Posts: 730
Reputation: 17,002

Post » Mon Apr 10, 2017 6:38 pm

MPPlantOfficial wrote:I can't see the capx but when you say Bioshock Hacking minigame do you mean a Pipe puzzle?

I've seen a capx scattered around here somewhere using tilemaps but I don't know if it still works.
I guess the challenging part would be getting that flowing water animation part to play.

I've updated the .capx!

Yes, the flowing would be very hard too, but I do not want it. My system is just similar to Bioshock, not equal. I just want the "rotate and engage" thing, until you reach the goal.
B
6
Posts: 21
Reputation: 292

Post » Mon Apr 10, 2017 7:25 pm

I understand what you're trying to do now.
Here: https://www.dropbox.com/s/p04xd82wc1n3m ... .capx?dl=0
I corrected your capx and even included an indicator sprite.
Image Image Image
B
29
S
11
G
27
Posts: 730
Reputation: 17,002

Post » Mon Apr 10, 2017 7:46 pm

For swapping/replacing part I have an example on following topic: viewtopic.php?f=147&t=110979&p=810243#p810243

And code to make pipe rotate:
Image

The rest would be utilizing flood-fill:
viewtopic.php?f=178&t=126712&p=897373&hilit=flood#p897373
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Mon Apr 10, 2017 8:09 pm

Thank you very much, guys! these are awesome examples.

And @MPPlantOfficial, the keyboard based selection works perfectly!

Sorry for bother again, but what about the spawn thing?
I put the pipes manually in the layout, but I don't want it like this.. I need to spawn everything when something happens in the game.

By the way, as the pieces layout can't be always the same and each layout need to have just one way to be finished, what way do you guys recommend that I do?

But seriously, thank you very much guys! the people in this forum are awesome.
B
6
Posts: 21
Reputation: 292

Post » Mon Apr 10, 2017 8:30 pm

If you have fixed amount of pipes, that would be hard to create random pipes formation since you can't be sure if it can make correct connection to desired goal. I suggest you plot the valid pipe connection pattern first then randomize the rotation for all pipes on the game start.
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 53 guests