I want to make a spinning blade sprite, but if I make it move forward while rotating, it will move in circles. Is there a way where I can just rotate the costume? Or rather, make it keep moving in the same direction regardless of what way it's facing?
Probably the easiest way would be to make a second, hidden sprite and attach the original sprite to that one as its anchor. Then you can independently spin the first sprite and move the second sprite, which isn't turning.
See Section I.B, page 10, of the manual.
Use this:
I just copied the definition of the move (10) steps block and added a direction input.
If this doesn't solve the problem, let me know!
Yay, someone is using the Snap!-in-Snap! definitions for something! :~D
forever { turn (5) degrees::motion change x by (5) } ?
I thought of that too. However, @the_meep111's definition is more versatile - you can move in any direction independently of the sprite's direction.
How did you make it detect direction? I can add a variable called "direction", but it doesn't seem to affect the way the sprite is facing.
What?
The block is already made, drag the picture of the block into your editor
You're telling me...
You could do that this whole time?!?!?!?!
I guess?
Oops. I always forget to tell people they can drag and drop script pics. I was halfway through an explanation on how to use the block just now.
PS: I didn't find out that was possible either until like a year into using Snap!.
yeah, i think this needs a forum tutorial wiki post.
... except nobody reads those (at least I doubt many new users do anyway). It would probably have to be in the welcome message snap sends every new user.
Ah, no, there are way too many cool features like that. What we could do is have a "feature of the day" button that could rotate among a dozen cool features. For example, how many people know that you can shift-drag a block out of a script?
Honestly that would be much better.
Maybe two buttons, UI feature of the day and block of the day.
Didn't know that was a thing, and I'm glad I do now XD
YOU CAN DO THAT??? That would have saved me so much time...
I found this out accidentally a few years ago