If statement and rearranging game

I have a mini game where the user needs to move four pictures into a certain order - 3, 4, 1 and 2, for example, and currently they are in order 1, 2, 3 and 4.

Can Zappar let you move objects around the scene using your finger? A touch event maybe?

If so, how can I programme it?

I’m thinking something like:

If 1 is clicked, and nothing else has been clicked, and it is the first one clicked, this is incorrect.
If 1 is clicked, and 2 has been clicked, this is incorrect
If 1 is clicked, and 3 has been clicked, this is incorrect
If 1 is clicked, and 4 has been clicked, this is correct

and so on for the rest of the pictures, but I feel this is a bit long-winded…?

And if we can’t move things around the screen, any ideas of how I can build this? Perhaps revealing a tick appear on top of the button, then disabling it, and showing some animation of it moving until everything is ticked, and then a “well done” pop up appears? I’m talking out loud here… Trying to find the simplest solution to go about it.

Thank you in advance, Forum!

yes you can. take a look at the 2d photo Feature. If you’re looking for something like that We could help you out.

Steve

Steve: always a fountain of knowledge! Thank you for your reply!

This one? https://docs.zap.works/studio/tutorials/3d-photofeature/

more or less the same thing. Inside the 3D Photo Feature Symbol and 2D Photo Feature Symbol is coding for moving and change size of things. It’s a good place to start.

Steve

Very good - thanks! I’ll check it out.

1 Like

The demo is cool for moving things on screen - thanks! - but how can I code it so Zappar knows the graphics have been dragged in the right order?

1 Like

That will take a bit more coding. I’m on my phone right now but I posted a sliding photo block game a bit ago. One that you move one at a time. It doesn’t have a check but one could be added.

Steve