Discuss Scratch
- Discussion Forums
- » Bugs and Glitches
- » follow script
- presentgames
-
Scratcher
3 posts
follow script
hello scratch! i came here to report a bug that`s really been BUGGING me
every time i try to make a sprite follow another it always goes the opposite direction
every time i try to make a sprite follow another it always goes the opposite direction- _nix
-
Scratcher
1000+ posts
follow script
What's your script?
Making a sprite follow another sprite is pretty simple:
It could be that your sprite is facing in the wrong direction, because of its costume. Take a look at this:

In the costume editor, right means forwards. You can see that in this simple demo:

It might be that your sprite was drawn so that its face is on the left, which would look like this:

But note that the sprite is still following the mouse (its target), not going away from it. I think something would have to be wrong in your script for the sprite to be moving away from whatever it's following.
Making a sprite follow another sprite is pretty simple:
when green flag clicked
forever
point towards [target v]
if <(distance to [target v]) > (10)> then
move (10) steps
else
go to [target v]
end
end
It could be that your sprite is facing in the wrong direction, because of its costume. Take a look at this:

In the costume editor, right means forwards. You can see that in this simple demo:

forever
point towards [mouse-pointer v]
end
It might be that your sprite was drawn so that its face is on the left, which would look like this:

But note that the sprite is still following the mouse (its target), not going away from it. I think something would have to be wrong in your script for the sprite to be moving away from whatever it's following.
- francisco418
-
Scratcher
24 posts
follow script
Its pretty easy:
when green flag clicked
forever
point towards [target]
move (How much you want) steps
end
Last edited by francisco418 (June 11, 2020 02:42:25)
- -gr
-
Scratcher
1000+ posts
follow script
Its pretty easy:Please don't Necropost.when green flag clicked
forever
point towards [target]
move (How much you want) steps
end
Last edited by -gr (Sept. 22, 2021 21:30:41)
- 1492864
-
Scratcher
500+ posts
follow script
How Ocular? and why did you find this?-snip-Please don't Necropost.
- Discussion Forums
- » Bugs and Glitches
-
» follow script







