How to make your own Swipe! project



So, I decided to make a tutorial on how to make a Swipe! project just like mine. Feel free to use this tutorial to make your own. This will also be useful for projects with things like pointing in certain directions, and velocity, also. Here it goes:
1. Make a new object. Use anything you'd like, but I reccomend an Emoji.

2. Place the object in the middle of the screen.

3. Make this rule:

This will initiate the clones in the original project. You'll see what we use the Length value for in the next rule.
4. Next rule, for clones only:

This will make a large emoji that looks 3D.
5. Add a bit to the clone rule:

Make a new value called Rot (Or rotation, I use the word Rot for short), and use it like shown.
6. Make another rule to start the scrolling process:

The value start will help us with scrolling, by saying where we started touching on the X axis.
7. Make this next rule to finish the scrolling section:

This will make it so that we can swipe, and turn the 3D emoji.
8. Add this rule to help us detect when we aren't pressing.

The pressing value will tell us how long it's been since we last pressed the IPad.
9. Add this rule to make it so we can entirely detect how long it's been since we touched the IPad:

This will make it so the value Touching is 0, when you press the IPad.
10. Add another rule:

This will initiate the velocity of the turning when you release.
11. Add this second to last rule to the object:

This will slowly lower the velocity of the 3D emoji as time goes on.
12. Add this final rule:

This will make the object actually turn when you swipe.

You can now test this project. Do it!

Oh no! Something is wrong. The object spins really, really fast at first, but then slows down very fast. Here's why:
All of the clones are executing these rules at once. That will cause the velocity to slow down really, really fast. Also, all of the clones are increasing the rot value by the velocity, all at once! This causes it to spin really fast.

Luckily, we can easily fix this. All we have to do is make it so only the original does these rules. To do so, we need to give the original a special "ID". We do that by setting its speed to 0.

This will work because when the clones use a value that is something like X Position or Rotation, it uses the clone's amount, not the original. Since the default for speed is 400 (or 1000, I don't remember), we can give the original a special ID, that the rules need for them to execute. Then, we can fix this.

  1. Modify the first rule to set speed to 0:

    This will give the original the special ID.
  2. Modify the rules below to have a check once if speed = 0 block surrounding the code:

    Now, test it! Hopefully, everything works. If it doesn't, you can look at my original Swipe! project.
    If you have any questions, ask!


This post was flagged by the community and is temporarily hidden.


No problemo!!! 20,20!


I am going to make a youtube video for it!!!!!


Good idea! 20,20,20!


This is so clever!! I was trying to make this for hours!! :sweat_smile:

I can't like, so here :heart:


I love this, @Valgo. Total fun. And so nice of you to make the effort to share! Bravo.


Thank you!!!!!!!!!!!


@Aariv This topic is an example of a Hopscotch Forum tutorial.

Bookmark it if you’d like to remember it.