Check Drop Puzzle

Hey guys, I need help, I'm working on a puzzle and I need when the puzzle is done jump to the next scene.

Thanks for your support.

Puzzle-Hype.zip (576.7 KB)

The way I handled this was:

in setup():

  • make a new array window.completed = [];
  • in your pieces loop, add values for each piece of false

in check():

  • if the piece works (succeeds in the if condition), then set completed[i] = true;
  • add an else statement for this for when it fails to set completed[i] = false;
  • at the end if it is either the end of a drag or just the function being called (like a rotate click), then go through the completed array. If all items are true then all pieces are complete, and transition to the next scene

Puzzle-fixed.hype.zip (258.0 KB)

2 Likes

Hello Jonathan, thank you very much for your help, you are a true master, your deep knowledge of programming is an inspiration to me, I work hard to learn every day and become a decent programmer :slight_smile:

Again, thank you very much.

1 Like