Discuss Scratch

fluffykittymeowy
Scratcher
13 posts

How do you make your sprite move up, down, left, right gracefully?

I want to make a project featuring that but I can't make it.
AwesomeGameCreator
Scratcher
100+ posts

How do you make your sprite move up, down, left, right gracefully?

There is a plethora (a lot) of posts about this, go check them out.
AwesomeGameCreator
Scratcher
100+ posts

How do you make your sprite move up, down, left, right gracefully?

for your convenience, I have linked the page below AND provided the anwser.
http://www.scratch.mit.edu/discuss/topic/39844/

try this
forever

if <key [ left arrow] pressed?> then

change x by (join [-] (speed))
end
if <key [right arrow] pressed?>
change x by (speed)
end
end
change x to y and the sensing blocks for up and down, basically vise versa



feel free to follow me, I will follow you if you do

Last edited by AwesomeGameCreator (May 29, 2014 13:08:15)

ad1060192
New Scratcher
3 posts

How do you make your sprite move up, down, left, right gracefully?

this works

forever

if <key [left arrow] pressed?> then
point in direction ( -90)
change [ xvelocity] by (-1)
end
if <key [up arrow] pressed?> then
point in direction ( 0)
change [ yvelocity] by (1)
end
end


replicate those just change the right key to +1
also the down key to -1
lilkitty0728
New Scratcher
1 post

How do you make your sprite move up, down, left, right gracefully?

r123a
Scratcher
1000+ posts

How do you make your sprite move up, down, left, right gracefully?

ad1060192
r123a
Scratcher
1000+ posts

How do you make your sprite move up, down, left, right gracefully?

Sorry I made a mistake. this is what I wanted to say “ad1060192 is right”.

MiniWoofGaming
Scratcher
81 posts

How do you make your sprite move up, down, left, right gracefully?

define graceful please
InternetUser_005
Scratcher
100+ posts

How do you make your sprite move up, down, left, right gracefully?

Hey,

I just shared a project that demonstrates some different approaches to making a sprite move. Some of them may be classified as graceful IMO.

http://scratch.mit.edu/projects/37917762/

HTH
IU5
17limo
Scratcher
100+ posts

How do you make your sprite move up, down, left, right gracefully?

You could also use change Y and X for it to be pretty smooth.
ApplePie_77
Scratcher
4 posts

How do you make your sprite move up, down, left, right gracefully?

when green flag clicked
forever
if <key left arrow pressed> then
change x by (-6 (OR you can do something else))
if <key right arrow predded> then
change x by (6 (OR you can do something else))
if <key up arrow pressed> then
change y by (6 (OR you can do something else))
if <key down arrow pressed> then

change y by (-6 (OR you can do something else))
end

end

end

end

end
ApplePie_77
Scratcher
4 posts

How do you make your sprite move up, down, left, right gracefully?

oops you were not supposed to put the “if” inside of each other. Ignore dat bit…
Crimson19
Scratcher
1000+ posts

How do you make your sprite move up, down, left, right gracefully?

Hmm, moving can be a bit chunky. I recommend using this script:
when [ left] key pressed
glide (1.5) secs to x: ((x position) - (20)) y: (y position)
etc
Or, if you want it to move around like a ball (you were pretty vague about it) you can use.

when green flag clicked
forever
move (10) steps
if on edge, bounce
end

Hope this helps.

Last edited by Crimson19 (Dec. 26, 2014 11:10:00)

digthebone
Scratcher
500+ posts

How do you make your sprite move up, down, left, right gracefully?

go here for all the info you need.
kennydoan
Scratcher
34 posts

How do you make your sprite move up, down, left, right gracefully?

Just make a variable name it anything.
Then make a forever that changes the characters x to the variable.
Now make it so that when the walk key is pressed, it adds or subtracts from the variable, I think adding moves it right
and subtracting moves it left.

Sorry I'm using a mobile device I cant be on my PC right now.

I thought that sharks were punching bags. Their bite makes pirrahna bites like slaps.



SeabassScratch
Scratcher
7 posts

How do you make your sprite move up, down, left, right gracefully?

hi guys
SeabassScratch
Scratcher
7 posts

How do you make your sprite move up, down, left, right gracefully?

ad1060192 wrote:

this works

forever

if <key [left arrow] pressed?> then
point in direction ( -90)
change [ xvelocity] by (-1)
end
if <key [up arrow] pressed?> then
point in direction ( 0)
change [ yvelocity] by (1)
end
end


replicate those just change the right key to +1
also the down key to -1
SeabassScratch
Scratcher
7 posts

How do you make your sprite move up, down, left, right gracefully?

hope that helps
say [] for (2) secs
CreepyChannel
Scratcher
46 posts

How do you make your sprite move up, down, left, right gracefully?

You could go old school and do

when green flag clicked
glide () secs to x: (0) y: (0)
SpeedStar99
Scratcher
1 post

How do you make your sprite move up, down, left, right gracefully?

fluffykittymeowy wrote:

I want to make a project featuring that but I can't make it.

same here

Powered by DjangoBB