Discuss Scratch

lisarath
New Scratcher
4 posts

Make sprite move faster

What would be the appropriate steps to make my sprite move faster as a game goes on? Thank you.
bunnymustard
Scratcher
500+ posts

Make sprite move faster

whenclickedforeverchangeVariableby1moveVariablesteps
lisarath
New Scratcher
4 posts

Make sprite move faster

Thank you. I have tried that but my sprite just shows on the edge of the stage but does not move. Any suggestions? Appreciate your help.
ssss
Scratcher
500+ posts

Make sprite move faster

The sprite touching the edge is an effect of how Scratch works - to prevent new programmers from being confused, no sprites can go off the screen completely. Are you making a game that continually scrolls, or a platformer (background is static)
lisarath
New Scratcher
4 posts

Make sprite move faster

My background is static. I do already have some code as follows (not sure if this is affecting it in any way):

When green flag clicked
set speed to 1
forever
move speed steps
if on edge, bounce

ssss
Scratcher
500+ posts

Make sprite move faster

Alright, you need to first set the position of your sprite. Try
gotox:-100y:0

~ Does this help?
lisarath
New Scratcher
4 posts

Make sprite move faster

Thanks. I have got it now. :-)
ssss
Scratcher
500+ posts

Make sprite move faster

No problem!
Snowy2004
New Scratcher
1 post

Make sprite move faster

MAKE SPRITE MOVE FASER!!!!
philipwells
New Scratcher
1 post

Make sprite move faster

How do I make my sprite go quicker someone pls help me
PartyChick777
Scratcher
1 post

Make sprite move faster

The Higher the number the faster it moves!

whenright arrowkeypressed
pointindirection90
move50steps

Last edited by PartyChick777 (June 12, 2016 05:30:42)

lpm0327
Scratcher
1 post

Make sprite move faster

How can I make my sprite move faster as the game goes on?
CobramCat
Scratcher
68 posts

Make sprite move faster

lisarath wrote:

My background is static. I do already have some code as follows (not sure if this is affecting it in any way):

When green flag clicked
set speed to 1
forever
move speed steps
if on edge, bounce

I think that I'd be making a variable (eg: quik, give it a “set quik to 1”, but then in the above listing, replace the “1” with “quik”.).
As your game progresses, "change ‘quik’ by +/- some fraction".
At least, that would be my starting point.
masterd22
Scratcher
3 posts

Make sprite move faster

Do you want your sprite to increase its speed only when it moves? Or do you want the speed to inscrease with time?

Look at script A or B depending on your preferred option. I added a speed limit as the sprite may move too fast past a certain threshold.

A) Speed increases as the sprite moves

whenclickedsetspeedto1setspeed limitto20foreverifkeyright arrowpressed?thenmovespeedstepschangespeedby0.3ifonedge,bounceifspeed>speed limitthensetspeedtospeed limit


B) Speed increases independantly of the sprite. We need 2 sets of blocks:

whenclickedsetspeedto1setspeed limitto20foreverchangespeedby0.3wait0.1secsifspeed>speed limitthensetspeedtospeed limit

whenclickedforeverifkeyright arrowpressed?thenmovespeedstepsifonedge,bounce
DestinyE99
Scratcher
1 post

Make sprite move faster

amylaser
Scratcher
500+ posts

Make sprite move faster

Everyone, please check the date of the original post… This is an extremely old topic.

Also, if you have a question of your own, it would be better to make your own topic instead of posting on someone else's.
Portalnerd27
Scratcher
1 post

Make sprite move faster

bunnymustard wrote:

whenclickedforeverchangeVariableby1moveVariablesteps

What you just said literally made my day.
BRIGGS86
Scratcher
3 posts

Make sprite move faster

@Portalnerd27 Same here!!! “Because Im a potato” Is my fave quote!!!
titanscratch
Scratcher
100+ posts

Make sprite move faster

Try this:
whenclickedrepeat10move1stepsrepeat10move2stepsrepeat10move3stepsrepeat10move4stepsrepeat10move5stepsAndsoon...Andsoon...
You can change all the numbers.

I hope I helped.
CilianSmith
New Scratcher
1 post

Make sprite move faster

If two sprites are racing, and let's call them cat and dog, if the cat got to the finish line first, how would you make all scripts stop for the dog and the cat?

Powered by DjangoBB