Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Code for a retuning sprite
- banbooman
-
Scratcher
10 posts
Code for a retuning sprite
Okay lets say I want a sprite to return to X:0 Y:0 but unlike the guide script I want the sprite to go there at a set speed and not a time based speed like “go to_ in 1 second” I want something like “go to__ at move 3X” or something any ideas yall?
- The_Floppy_Disc
-
Scratcher
100+ posts
Code for a retuning sprite
You can make it do this:
If this doesn't work, please tell me.
point towards [Where the sprite is going v]If you want to make a suggestion, put this in the suggestions section.
repeat until <touching [Where the sprite is going v] ?>
move (Speed) steps
end
glide to x: (0) y: (0) at speed (10) steps per second ::motion
If this doesn't work, please tell me.
- iloveEVERTONtheyrule
-
Scratcher
76 posts
Code for a retuning sprite
instead you could use a glide block. This allows you to alter the speed of the movement
glide (however many) secs to x: (whatever you want) y: (whatever you want)
- The_Floppy_Disc
-
Scratcher
100+ posts
Code for a retuning sprite
instead you could use a glide block. This allows you to alter the speed of the movementIt is possible to do that, however, the OP said that they wanted to move at a certain speed, not a time based speed.glide (however many) secs to x: (whatever you want) y: (whatever you want)
- iloveEVERTONtheyrule
-
Scratcher
76 posts
Code for a retuning sprite
It is possible to do that, however, the OP said that they wanted to move at a certain speed, not a time based speed.
then you could create a speed variable
then you could create a speed variable
(speed)
- Discussion Forums
- » Help with Scripts
-
» Code for a retuning sprite