Discuss Scratch

archman998
Scratcher
2 posts

How to make an sprite follow another sprite.

I'm trying to make a shooter game, and the arm (holding the gun) will point wherever your mouse pointer is, as well as being connected to the player, if I use ‘Go to player’ in a forever loop, then it will just go to the center of the player and not to the place where it is supposed to be. How do I make it follow the player, but also stay in the place where the arm should be? I'd put an image but I don't know how.
Theo_1er
Scratcher
500+ posts

How to make an sprite follow another sprite.

forevergotoplayerchangexbychangeybypointtowardsmouse pointer

Last edited by Theo_1er (May 11, 2021 20:04:01)

TheAnomalousPseudo
Scratcher
1000+ posts

How to make an sprite follow another sprite.

Or this:

gotox:x-positionofSprite1y:y-positionofSprite1+5
ronhio
Scratcher
36 posts

How to make an sprite follow another sprite.

This will work, too:

forevergotoPlayerpointtowardsMouse PointermoveHowevermanystepsyouwantittomovetolooklikeitisconnectedsteps
archman998
Scratcher
2 posts

How to make an sprite follow another sprite.

Thanks everyone! This really helped!
akosiku
Scratcher
14 posts

How to make an sprite follow another sprite.

whenclickedforeverglide3secstoanothersprite
end



the sprite will now follow the other sprite.
check out my game to see how it works:https://scratch.mit.edu/projects/528037793

Last edited by akosiku (May 12, 2021 05:46:56)

akosiku
Scratcher
14 posts

How to make an sprite follow another sprite.

when green flag clicked
forever
glide 0.3 seconds to (another sprite)

Powered by DjangoBB