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. (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 (258.0 KB)


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