Discuss Scratch

sunburstboi
Scratcher
10 posts

How can I make a sprite follow another sprite without lag?

So I'm trying to make a fnaf style game, and in the office have it move with arrows. But I also want vents and to do that I need to make a new sprite so it can have functionality. So I want it to be the same as the office (same x and y positions, same size, even laid out the vents on the office sprite and copied those directly to a new one)
But no matter what I do, it'll follow the sprite but with some delay which looks weird and stupid. So here is my question: How can I make it so the vent sprite can have the same x position as the main sprite without any delay?
Mintvbz
Scratcher
8 posts

How can I make a sprite follow another sprite without lag?

Hello! Would you mind providing a project link that I could view the code of and test it out for myself to solve the issue?
Oumuamua
Scratcher
1000+ posts

How can I make a sprite follow another sprite without lag?

evrytime your main sprite moves broadcast a message for the other sprite

whenIreceivemove
SonicTester
Scratcher
40 posts

How can I make a sprite follow another sprite without lag?

Bear in mind (pun unintended) that FNAF style horror games are against the rules of Scratch.

Anywho, you can do something like this:

whenclickedforevergotooffice

Last edited by SonicTester (Nov. 29, 2022 20:32:50)

_ninjatuna
Scratcher
58 posts

How can I make a sprite follow another sprite without lag?

foreverglide1secstoother sprite
DeveloperTools
Scratcher
100+ posts

How can I make a sprite follow another sprite without lag?

sunburstboi wrote:

So I'm trying to make a fnaf style game, and in the office have it move with arrows. But I also want vents and to do that I need to make a new sprite so it can have functionality. So I want it to be the same as the office (same x and y positions, same size, even laid out the vents on the office sprite and copied those directly to a new one)
But no matter what I do, it'll follow the sprite but with some delay which looks weird and stupid. So here is my question: How can I make it so the vent sprite can have the same x position as the main sprite without any delay?
whenever you move the office, broadcast a message and then make the rest of the objects move when the broadcast is received

Powered by DjangoBB