Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » SPINNING WHILE MOVING
- NinjaLemon2016
-
Scratcher
18 posts
SPINNING WHILE MOVING
How do you make a spin while its moving? Also, how can I copy and paste my intro into one of my more recent projects if it's in a different project?
- Catalystix
-
Scratcher
100+ posts
SPINNING WHILE MOVING
1.) How do you make a spin while its moving?
You can change it's x and y coordinates manually instead of using
can move the sprite while rotating the sprite at the same time. Or if that's too complicated you could have it forever go to a second invisible sprite while rotating. i.e.
2.) how can I copy and paste my intro into one of my more recent projects if it's in a different project?
You can add the intro code to your “Backpack” and then when you begin a new project select the block(s) from the Backpack to add them into the new project.
You can change it's x and y coordinates manually instead of using
move (3.14) stepswhich only moves in the direction the sprite is currently facing. Using
change x by ()
change y by ()
can move the sprite while rotating the sprite at the same time. Or if that's too complicated you could have it forever go to a second invisible sprite while rotating. i.e.
forever
go to [Invisible Sprite That's Moving v]
turn cw (Rotation) degrees
end
2.) how can I copy and paste my intro into one of my more recent projects if it's in a different project?
You can add the intro code to your “Backpack” and then when you begin a new project select the block(s) from the Backpack to add them into the new project.
Last edited by Catalystix (Nov. 15, 2015 05:46:15)
- NinjaLemon2016
-
Scratcher
18 posts
SPINNING WHILE MOVING
I kind of do not get it
Last edited by NinjaLemon2016 (Nov. 16, 2015 13:46:03)
- deck26
-
Scratcher
1000+ posts
SPINNING WHILE MOVING
If you have a project you need help with share it and provide a link (or tell us how to identify it).
The backpack is explained here http://wiki.scratch.mit.edu/wiki/Backpack
The backpack is explained here http://wiki.scratch.mit.edu/wiki/Backpack
- NinjaLemon2016
-
Scratcher
18 posts
SPINNING WHILE MOVING
I get the backpack, I just don't get how to make a sprite while moving
- deck26
-
Scratcher
1000+ posts
SPINNING WHILE MOVING
You haven't given much information on how you want the movement to appear or what kind of spinning you mean. Sharing a project always makes it easier to help.
Basically you need to combine pointing in different directions with, presumably, rotating the sprite. That means you can't just use the
Basically you need to combine pointing in different directions with, presumably, rotating the sprite. That means you can't just use the
move () stepsblock as the sprite will then be moving in the direction it is pointing. Both the glide method of moving and using change x (or y) by a number will allow you to move the sprite as you wish while still changing the direction it is pointing which gives one form of spin.
- srelun
-
Scratcher
8 posts
SPINNING WHILE MOVING
Basically what deck26 said was that you can't use the
move () stepsblock because you would be rotating. so you would need to use
glide () secs to x: (0) y: (0)and so it would still be rotating but going where you want the sprite to go.
Last edited by srelun (Nov. 17, 2015 15:25:43)
- Ataxaos
-
Scratcher
500+ posts
SPINNING WHILE MOVING
An alternative way is to rotate your sprite costume by costume in the costume editor, then set rotation style to “don't rotate” (rotation style only affects how the costume displays; since you're already spinning the costume, make sure the facing direction doesn't mess that up).
- jinggle
-
Scratcher
5 posts
SPINNING WHILE MOVING
There is a third option. You can have two sprites, and one sprite handles the directional movement while the second sprite handles the rotation. Then have rotation sprites x, y coordinates go to the movement sprites position. You can use a transparent sprite for the movement sprite
Here is a very basic project that demonstrates the technique:
separate move and rotate
go to x: ([x position v] of [Movement v]) y: ([y position v] of [Movement v])
Here is a very basic project that demonstrates the technique:
separate move and rotate
- jabblock
-
Scratcher
4 posts
SPINNING WHILE MOVING
Or you could just do something like this
when [ 2] key pressed
glide (2) secs to x: (2) y: (2)
when [ 2] key pressed
forever
endturn ccw (2) degrees
Last edited by jabblock (April 28, 2017 12:32:34)
- jabblock
-
Scratcher
4 posts
SPINNING WHILE MOVING
Or you could just do something like thiswhen [ 2] key pressed
glide (2) secs to x: (2) y: (2)when [ 2] key pressed
turn cw (2) degrees
Last edited by jabblock (April 28, 2017 12:34:38)
- duckboycool
-
Scratcher
1000+ posts
SPINNING WHILE MOVING
Please check the date of this topic before posting. The person who posted this is likely no longer watching to get your advice.
- Discussion Forums
- » Help with Scripts
-
» SPINNING WHILE MOVING