Puzzle Slide Photo

I’m doing a Puzzle Slide in Gdevelop 5, and I have these three difficulties:

  1. How do I get it scrambled ??
  2. Play sound each time a piece is moved
  3. After the person is able to resolve the winner message with audio
    This is project:
    Could someone help me ??

Here’s how you can shuffle:

To play a sound, add a sound action next to the movement action.
To check if the game is won… At the beginning of the game, before shuffling, you need to store the initial (goal) position of each piece and then during the game, check if all of them are on their goal.

Did you see that diagonal movement is possible in your game? :wink:

Thank you so much for answering me :sorrindo:
I didn’t know that diagonal movement was possible, thank you for informing me, God bless, you are helping me a lot

I didn’t understand where I went wrong

Check my screenshot again :slightly_smiling_face: It needs to be a for each event, to apply to all of the instances:

Forgive my lack of attention,
Am I still getting the same result where I’m going wrong?
Thank you so much for answering me

I shouldn’t have used “cheia” I think, change them to “init”.
Looks like I got lucky, it only works when the lower right corner is empty at the end of the shuffle. :hushed:
There’s some conflict with the rest of your game mechanics, I’m not sure what…
It works if you move the pieces out of the board in the scene editor.


Thank you for letting me know, it isn’t possible to move the pieces, why is this happening ??

I think you forgot a line:

Good job on getting this far, though :clap:

It shuffles but is unstable, sometimes the pieces move and sometimes the pieces don’t move, I can’t see where I’m going wrong
Thank you so much for helping me if it weren’t for you I wouldn’t have made it this far

Hmm, I guess I was lucky again!
I had to inspect your mechanics and… there were several mistakes and some useless mess. :grin:
Try this:
Looks like it’s working okay this time.
Try to forbid the tile jumps now. :wink:

1 Like

You reduced the number of lines of code to make everything perfect !!
You are the best !!

Now I’m just going to place the winner at the end of the code so that when the player completes the image, the message appears on the screen: “Congratulations you won the game !!” just like you explained to me in your first reply, I’m very happy, thank you very much S2

1 Like