Discuss Scratch

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

_nix
Scratcher
1000+ posts

follow script

What's your script?

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.

══ trans autistic lesbian enbydoggirls // 16 17 18 19 20 21, she/they
sparrows one word to the paragraph // <3 // ~(quasar) nebula
presentgames
Scratcher
3 posts

follow script

thanks!!!! nix
_nix
Scratcher
1000+ posts

follow script

presentgames wrote:

thanks!!!! nix
No problem, glad I could help.

══ trans autistic lesbian enbydoggirls // 16 17 18 19 20 21, she/they
sparrows one word to the paragraph // <3 // ~(quasar) nebula
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

francisco418 wrote:

Its pretty easy:
when green flag clicked
forever
point towards [target]
move (How much you want) steps
end
Please don't Necropost.

Last edited by -gr (Sept. 22, 2021 21:30:41)





-gr: forumer | scratcher | professional exister

1900+ forum posts / 5+ years on Scratch

me on postpercent [broken] / me on github / me on scratch
highlight this text and shift+down arrow to see the rest of my signature





Terms of Use wrote:

4.4 You may only submit user-generated projects that were created with (1) the Scratch website editor or (2) an unmodified copy of the Scratch editor compiled from the source code described in Section 5.3. You may not upload any projects that were created, by you or by anyone else, with a modified version of the Scratch editor.
oh shoot well i broke that rule (i use turbowarp sometimes)
1492864
Scratcher
500+ posts

follow script

-gr wrote:

francisco418 wrote:

-snip-
Please don't Necropost.
How Ocular? and why did you find this?

Scratcheth f'rum us'r | 1 year on Scratcheth | 750+ posts| Inching to 1000 posts, 1 posteth at a timeth
Mine own most did view projecteth | Mine own most did love and fav'd projecteth | Latest projecteth |

Highlight h're and shift+down to readeth the rest.
The most did suggest suggestion:
Dark mode
cool_dog2902
Scratcher
2 posts

follow script

this is so EZPZ
Tunde123
Scratcher
1000+ posts

follow script

cool_dog2902 wrote:

this is so EZPZ
Please do not necropost.

This is a SIGNATURE. This is seperate from a normal post ^
Forum Posts: 2600+/3000
Highlight + Shift + Down Arrow = To see whole signature.




Want to friend me on Roblox? My username is BaconvsRoblox121314 if you want to friend me!

–v More Information v–
New Scratchers - Introduce yourself here!

Questions about Scratch - Ask questions related to scratch here!

Help with Scripts - get/provide help here!

Suggestions - Suggest blocks, features, and more here!

Bugs and Glitches - Report bugs/glitches here!

Last edited by Tunde123 (May 17th, 2022 10:18 AM EST)

Powered by DjangoBB