Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Sprite won't go to other sprite
- PizzaMaker45678910
- Scratcher
100+ posts
Sprite won't go to other sprite
I'm trying to make a hitbox for a game, but the problem is that when I control the player, the hitbox always lags behind.
Usually I would do this:
It works every time, but this time it is not working for some reason. Please I need help!!!!!!
Usually I would do this:
when green flag clicked
forever
broadcast [Tick v]
end
when I receive [Tick v]
repeat (2)
go to [Player v]
end
It works every time, but this time it is not working for some reason. Please I need help!!!!!!
Last edited by PizzaMaker45678910 (May 11, 2021 19:23:51)
Discussion forums is recieving an update. To see further information, click here
I'm cursed :3 :) :P :: motion :: hat block
- TheAnomalousPseudo
- Scratcher
1000+ posts
Sprite won't go to other sprite
When you start the game, make it go to the player, but once the game starts, make the arrow keys (or whatever controls the player) control it as well the exact same way. In other words, copy and paste the movement scripts into the hitbox sprite.
We ought to be careful with that octopus that takes over the servers. He's well armed.
- Darkblade12
- Scratcher
100+ posts
Sprite won't go to other sprite
i remade your code, and it works just as well to only once per tick. in fact, that's what's happening. your player is moving every tick, but the hitbox has to repeat something twice, so the hitbox is moving every two ticks. that's why it's lagging behind.
problem solved.
when I receive [tick v]
go to [player v]
problem solved.
- PizzaMaker45678910
- Scratcher
100+ posts
Sprite won't go to other sprite
Sorry buddy, that won't work in the context of my game When you start the game, make it go to the player, but once the game starts, make the arrow keys (or whatever controls the player) control it as well the exact same way. In other words, copy and paste the movement scripts into the hitbox sprite.
Discussion forums is recieving an update. To see further information, click here
I'm cursed :3 :) :P :: motion :: hat block
- PizzaMaker45678910
- Scratcher
100+ posts
Sprite won't go to other sprite
No bruh, the reason I made it repeat twice is to STOP that from happening. Griffpatch discovered that doing that will fix the glitch, and like I said it worked for me every time. I don't know why it's not working THIS time though i remade your code, and it works just as well to only once per tick. in fact, that's what's happening. your player is moving every tick, but the hitbox has to repeat something twice, so the hitbox is moving every two ticks. that's why it's lagging behind.when I receive [tick v]
go to [player v]
problem solved.
Discussion forums is recieving an update. To see further information, click here
I'm cursed :3 :) :P :: motion :: hat block
- TheAnomalousPseudo
- Scratcher
1000+ posts
Sprite won't go to other sprite
…What's the context of your game?
We ought to be careful with that octopus that takes over the servers. He's well armed.
- Discussion Forums
- » Help with Scripts
- » Sprite won't go to other sprite