Better set angle block

A feature I’d like to see in Hopscotch is: A set angle block with direction

I’d use it for this type of project: platformers where the character is unsymmetrical.

Here are some examples of Hopscotch code that could be improved if we had this: The character could easily be flipped without extra stuff, and could clean up complicated code.

Here is an example design I’ve made:

I’ve seen something similar in another programming languages, it looks like this: I haven’t.

What it would do is, 0° on the “right” direction would look normal, but on the “left” direction, it would look like it had been flipped.

Also, ignore how the example design has “flip” instead of “set angle” lol

the example design took way too much time


well, it’s a great idea, i’d use it a lot, but you can do that with variable ;)


It would be easier tho for people who don’t know how to do it


yeah, but it’s better to let them discover themselves! Or people will be coding with already designed block, and that’s not the goal

sorry it’s not very understandable lol



another reason


When LeftArrow is pressed

Check once if Direction == Right

Set variable Direction to Left

The code isn’t complicated


I mean like it would make it shorter and easier.

1 Like

That wouldn’t make sense because if you tap it twice it changes back


oops :man_facepalming:t2:
yeah you’re right

i deleted my post because i feel really stupid :joy:

1 Like

If you want to flip you can do

Set width to width * -1
Set height to height


people who support +2 won’t use that :joy::joy:


Figured out how to do this: Test by Rishan ;)

Oh yeah, I didn’t think about that lol


The biggest issue is really the lack of an isFlipped trait (orange variable), and it’s even in the webplayer code already (not add a block but as a stage object property), so I don’t see why it hasn’t been implemented yet.


How did you do it?


It’s a long process, and I didn’t have any special photo editors

let’s lgbot


If you need designs for stuff I can help I am quick at art and stuff like that it would be as detailed as possible if you need help with stuff like that then just tag me I can help

I think it’s a good idea and we should have a flip block and you choose what direction it flips

1 Like


Process if you want it

First, I had to take a screenshot of the “when game starts, flip” block. Then, put it as an image in Hopsotch. Then, I had to make it bug and show the object thing in the bottom of the screen while it was playing. After that, I had to take a screenshot to save it, and found a website to find the rgb colors of the block so I could extend it. I then made a rectangle with that color. I took screenshots of the three lines you use to drag the block, and the rounded part of the flip block. Then I designed something that looks like the input thing on HS, and made it seem like I was selecting it. I use the website mentioned earlier to find the color of the gray part on the bottom to covere up one of the options. Then, I put rectangles over the current choices and remade them to say left and right. Finally, I had to merge the rounded edge screenshot, the draggy thing screenshot, and the current progress screenshot and make it seem better by adding these.

I might have forgotten a step tho lol

1 Like