Discuss Scratch

Basketbaldude2020
Scratcher
81 posts

How to make a Sprite turn 360 degrees

IM making my first intro and I want a srite to turn 360 degrees but the script didnt work

Here is the script:

when green flag clicked
forever
turn cw (360) degrees
play sound [the Microsoft windows XP intro v]
end
Just_Iakov
Scratcher
100+ posts

How to make a Sprite turn 360 degrees

Basketbaldude2020 wrote:

IM making my first intro and I want a srite to turn 360 degrees but the script didnt work

Here is the script:

when green flag clicked
forever
turn cw (360) degrees
play sound [the Microsoft windows XP intro v]
end

Sprite can make a total of a 360 degree turn. Meaning you can pretty much make it to the point anywhere you want.

There is no problem with your script, the problem is the way you are using the turn block. You are making the sprite turn a full 360, creating an illusion as if it never rotated (when in reality it did.)

repeat (6)
turn cw (60) degrees
end
This script would turn the sprite 60 degrees 6 times, which would be a full 360 turn.

repeat (360)
turn cw (1) degrees
end
This script would turn the sprite 1 degree 360 times, but in the end, it will make a full 360 turn.

forever
turn cw (360) degrees
end
This script will keep on turning our sprite 360 degrees. Making an illusion as if it never turned, but in reality it's just making full loop over and over.

The higher the value is, the faster the sprite will rotate. The limit is 180 (for normal rotations), anything above that would make things go a bit strange.

Fun fact:

Both of these blocks would rotate the sprite at the same speed:
turn cw (1) degrees

turn cw (361) degrees

Both of these blocks would rotate the sprite at the same direction & speed:
turn cw (-1) degrees

turn cw (359) degrees

Remember, the limit (for “normal” rotation) is from 0 to 180 (same for negative values, but it'll rotate the other way.)
*Making sprite rotate 181 degrees would be the same thing as rotating it -179 degrees.

I hope this helps.

Last edited by Just_Iakov (Oct. 9, 2021 09:33:17)

Basketbaldude2020
Scratcher
81 posts

How to make a Sprite turn 360 degrees

Ok so its more simple than I thought

Thanks for helping

Powered by DjangoBB