Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I make a sprite float after another?
- PixelPark
-
100+ posts
How do I make a sprite float after another?
I really want to learn how to make a sprite float after another, like a buddy in The Binding of Isaac.
This could also be used in an RPG, so your party members could follow you.
Does anyone have any suggestions on what I could do?
Am I on the right track by considering motion tracking?
This could also be used in an RPG, so your party members could follow you.
Does anyone have any suggestions on what I could do?
Am I on the right track by considering motion tracking?
- pwned95
-
10 posts
How do I make a sprite float after another?
Well you could use a script like this:
repeat until (distance to “object”<50):
point in direction of “object”
move 3 steps
wait until (distance to “object”>50)
repeat
repeat until (distance to “object”<50):
point in direction of “object”
move 3 steps
wait until (distance to “object”>50)
repeat
- BKFighter
-
1000+ posts
How do I make a sprite float after another?
I assume you mean like just behind their shoulder. Just have them be a bit higher than
, and use the direction of them to determine whether to place on the left or right side of the screen.
- PixelPark
-
100+ posts
How do I make a sprite float after another?
I'm gonna try this, I'll share my results in this feed! Thanks! Well you could use a script like this:
repeat until (distance to “object”<50):
point in direction of “object”
move 3 steps
wait until (distance to “object”>50)
repeat
- Discussion Forums
- » Help with Scripts
-
» How do I make a sprite float after another?