Discuss Scratch

mksean
New to Scratch
5 posts

Need help with Sprites! - Rotating

How do I make my sprite rotate? I'm making a maze game right now, and I want the sprite to face the direction in which it is moving. For example, when it is moving right, I want it to face the right direction. And when it is going left, I want it to face the left direction. I've been trying to do it, but can't seem to make it work. Please check my project out on —> http://scratch.mit.edu/projects/42439014/#player and tell me what I'm doing wrong. Thanks!


-mksean
deck26
Scratcher
1000+ posts

Need help with Sprites! - Rotating

you have rotation restricted to left-right. You need to modify the sprite's options to allow all round rotation or use the ‘set rotation style’ block to do so. Then you'll need to look for the up and down arrow keys to point in the right direction.
PaganoLeo10
Scratcher
100+ posts

Need help with Sprites! - Rotating

//1) Set your rotation style to all around or use this:

set rotation style [all around v]

//2) Now, Use either of these blocks depending which way you want to go:

turn ccw (15) degrees

turn cw (15) degrees

//And now you are done!

Last edited by PaganoLeo10 (Jan. 20, 2015 22:19:29)


Moving on from Scratch? Learn a C derivative or Java.
Please give me an internet (Yes, I am UnitedUntitled.) In return you get a slogan.
“Scratch is awesome” 43 translations later with Yandex we get “What is good”.


Being awesome, staying awesome. -PaganoLeo10


digthebone
Scratcher
500+ posts

Need help with Sprites! - Rotating

using this moving engine will make it move up or down, and make it point in the direction you want it to.
when green flag clicked
forever

if <key [up arrow v] pressed?> then
point in direction (0 v)
change y by (5)

end
if <key [down arrow v] pressed?> then
point in direction (180 v)
change y by (-5)

end
if <key [right arrow v] pressed?> then
point in direction (90 v)
change x by (10)

end
if <key [left arrow v] pressed?> then
point in direction (-90 v)
change x by (-10)

end




end

Digthebone

I make stuff. And I am always digging for new idea's.




mksean
New to Scratch
5 posts

Need help with Sprites! - Rotating

Thanks all of you! IT helped me a lot
TrueHollyleaf
New to Scratch
1 post

Need help with Sprites! - Rotating

I NEED help! thanks for the up down thing. helped me alot. now i have to make my sprite look right. its set to rotation 0 and it looks sideways instead of upride and correct. how should i rotate my character?
footsocktoe
Scratcher
1000+ posts

Need help with Sprites! - Rotating

TrueHollyleaf wrote:

I NEED help! thanks for the up down thing. helped me alot. now i have to make my sprite look right. its set to rotation 0 and it looks sideways instead of upride and correct. how should i rotate my character?

Did you design the character yourself? For rotation to work properly all the costumes of the sprite must face right and that must be the direction the sprite should go.

For example, a rocketship would lie on its side with its nose pointing right.


SHOOT THE SPACE MONSTERS! ….. A game everyone can play! Bright colors, bonky sounds!
THE 12 BALLS OF CRAZY AL ……. New scrolling adventure game!

Powered by DjangoBB