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

#1 2011-08-11 02:39:58

4lover
Scratcher
Registered: 2010-04-24
Posts: 500+

I have a question

how do you make a sprite thats moving constantly move slower? please help


Check out this awesome new zombie-cod type of game: http://scratch.mit.edu/projects/4lover/1975649

Offline

 

#2 2011-08-11 03:08:23

slayerrobe7
Scratcher
Registered: 2011-06-24
Posts: 500+

Re: I have a question

many ways on that work well is to make a veriable speed have it change to your needs and make this script for the sprite
(start)
(forever)
(move(1*(speed)steps


!!!When it comes to Scratch2.0 I am totally like freaking out!!!

Offline

 

#3 2011-08-11 03:40:17

Flait7
Scratcher
Registered: 2008-04-14
Posts: 100+

Re: I have a question

try

<when green flag clicked>
<set{ speed }to( 10 )>
<forever>
<move( speed )steps>
<change{ speed }by( -1 )
<end>

I think that will work


http://scratch.mit.edu/static/projects/Flait7/2248016_sm.pnghttp://scratch.mit.edu/static/projects/Flait7/1827934_sm.png

Offline

 

#4 2011-08-11 03:44:44

slayerrobe7
Scratcher
Registered: 2011-06-24
Posts: 500+

Re: I have a question

that will work but than you cant exactly control speed of the sprite


!!!When it comes to Scratch2.0 I am totally like freaking out!!!

Offline

 

#5 2011-08-11 03:47:54

Flait7
Scratcher
Registered: 2008-04-14
Posts: 100+

Re: I have a question

True, but the sprite will constantly be moving slower.


http://scratch.mit.edu/static/projects/Flait7/2248016_sm.pnghttp://scratch.mit.edu/static/projects/Flait7/1827934_sm.png

Offline

 

#6 2011-08-11 13:44:21

slayerrobe7
Scratcher
Registered: 2011-06-24
Posts: 500+

Re: I have a question

and will come to a stop eventually you must think about what happens next


!!!When it comes to Scratch2.0 I am totally like freaking out!!!

Offline

 

#7 2011-08-11 14:35:22

MyRedNeptune
Community Moderator
Registered: 2007-05-07
Posts: 1000+

Re: I have a question

slayerrobe7 wrote:

and will come to a stop eventually you must think about what happens next

It will start moving backwards. ^^


http://i52.tinypic.com/5es7t0.png I know what you're thinking! "Neptune! Get rid of those filthy advertisements and give us back the Zarathustra siggy, you horrible person!" Well, don't worry about it, the Zara siggy will be back soon, new and improved! ^^ Meanwhile, just do what the sig tells you to. >.>

Offline

 

#8 2011-08-11 16:44:15

Flait7
Scratcher
Registered: 2008-04-14
Posts: 100+

Re: I have a question

Then add the script
<if><( <{ speed }> <=> o )>
<stop script>
<end>

then it will slow to a stop.


http://scratch.mit.edu/static/projects/Flait7/2248016_sm.pnghttp://scratch.mit.edu/static/projects/Flait7/1827934_sm.png

Offline

 

#9 2011-08-11 17:21:03

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: I have a question

What would be better is:
[blocks]<when green flag clicked>
<set{ speed }to( 10
<forever>
<move( <{ speed }> )steps>
<if on edge, bounce>
<change{ speed }by( (( 0 <-> (( <{ speed }> </> 100 )) ))
<if><( .1 <>> <{speed}> )>
<set{ speed }to( .1
<end>
<end>
[/blocks]
Sorry if it's a little messy-the scratch blocks bbcode just is that way.

Basically, the sprite will go slower and slower, but never stop or go backwards.

And if it hits a wall, it bounces.

Last edited by kayybee (2011-08-11 17:21:20)

Offline

 

#10 2011-08-11 18:09:12

slayerrobe7
Scratcher
Registered: 2011-06-24
Posts: 500+

Re: I have a question

also you can tweek that script so it will exelerate


!!!When it comes to Scratch2.0 I am totally like freaking out!!!

Offline

 

Board footer