This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-10-23 18:14:01

funkychicken27
Scratcher
Registered: 2012-10-23
Posts: 1

smooth moving for sprite??

Help I can't figure out how to make a sprite move smoothly! will somebody please tell me how  sad

Offline

 

#2 2012-10-23 18:43:50

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: smooth moving for sprite??

I'm assuming that you're using [change x by (10)], right? Well then, you could use:

 
repeat (10)
change x by (1)
Filler//If you want the movement slower, you can add a wait block here.
end
I hope that this helps!


http://i46.tinypic.com/35ismmc.png

Offline

 

#3 2012-10-23 23:05:21

SOScratch
Scratcher
Registered: 2010-02-01
Posts: 100+

Re: smooth moving for sprite??

Here is the script I generally use for a moving script:

forever
if <key [up arrow v] pressed?> //change to movement direction
change y by (5) //changing this amount will change movement speed
switch to costume [Up v] //costume for going up
end
end
In the end, my script looks something like this:

forever
if <key [up arrow v] pressed?>
change y by (5)
switch to costume [Up v]
end
if <key [down arrow v] pressed?>
change y by (-5)
switch to costume [Down v]
end
if <key [left arrow v] pressed?>
change x by (-5)
switch to costume [Left v]
end
if <key [left arrow v] pressed?>
change x by (5)
switch to costume [Right v]
end
end
I set the movement values to 5 so they are not too fast and not too slow. You can change them to whatever you want. They will all work. The speed will just change.

WHATEVER YOU DO, DO NOT USE THE "MOVE (10) STEPS" BLOCK! IT WILL NOT WORK!!!

Last edited by SOScratch (2012-10-23 23:06:28)


-SOScratch
Scratch On!

Offline

 

#4 2012-10-24 11:27:53

edxforme
New Scratcher
Registered: 2012-10-22
Posts: 9

Re: smooth moving for sprite??

how to make this script work the way i want to. keep looping vertically (up motion from bottom of stage). or after it touches a sprite at the top of the stage or edge of stage then loop in a split of a second. also send a score to a score box

when flag click
forever
move 4 step

Offline

 

Board footer