Left-right and all around

so I'm trying to make a Sonic-type game. I'd like to make him flip left-right and rotate all around. I almost managed this by creating one sprite with the costumes, which could flip left-right and it was constantly stamping, and a second sprite was using "switch to costume (pen trails)" and it was able to spin all around. that worked well, but the result was blurry and it slowed everything down. so now I'm attempting to do a similar thing, but I've told it to adopt the frames directly from sprite1, which is still causing it to slow down, but not as much. but with this method, it's not blurry anymore but I can't flip it. my best guess is I need to use javascript to flip the image. is this simple to do, or am I wasting my time? I kind of don't want to do it the regular Scratch way, where you have frames for both left and right facing. using SA3 sprites, that's a lot of flipping to do.

Hi! Welcome to the forum.

I'm not quite sure I understand what you're trying to do. You can tell a sprite whether to flip left-right or rotate, or neither, with the three buttons above the scripting area, just to the right of the palette color selector and to the left of the little picture of the sprite.

If you want to change rotation style within a program, you have to use the 5.0 beta at https://snap.berkeley.edu/snapsource/dev/snap.html and in the SET block, the one you use to set the value of a variable, the pulldown menu has a submenu called "my" in which "rotation style" is one of the choices. Set it to
0 - don't rotate
1 - rotate
2 - flip left-right

Is that what you're looking for?

I want to be able to do both flip left-right and rotate at the same time, as seen in any Sonic the hedgehog game. the way I'm approaching this is having one sprite flip left and right, while another sprite is adopting it's visual properties and rotating, achieving both. this is only half-working though.

if it helps, here's the best I've got so far. I want to do exactly this, but ideally without using the pen trails, as that makes it blurry. Google Drive Link

Oh, I see. Lots of ways. Probably the easiest is just to duplicate and flip all the costumes, then rotate among 1-8 or 9-16 depending on left-facing or right-facing. You'll have to do something slightly more complicated than just "next costume" but it should be straightforward.

I'd rather make the code do all of the flipping though, because I have many frames. I'm no stranger to needlessly complicated code :slight_smile:

Umm, two sprites, nested so they stay together, facing opposite directions, and they take turns hiding and showing? One a clone of the other so they share costumes?

oh! I just found my solution in the snap 5 beta. the stretch block. thank you for your time

Oh awesome! I'll be interested to see the final project.