Discuss Scratch

simpsonsmaster
Scratcher
50 posts

One sprite won't run when another sprite is running certain code

In my project, I have a sprite that has basic moving code(Forever:If pressing up arrow:change y by 1). Whenever I am pressing an arrow key to move the sprite, code from one of my other sprites stops running and when I let go of the arrow key, the code starts running again. I have figured out that it is not the arrow keys that stop it, it is the code. I added a forever loop under a when flag pressed to forever switch the sprite to a certain costume and that also stopped the sprite from running. Could someone please help me?
han614698
Scratcher
1000+ posts

One sprite won't run when another sprite is running certain code

Can you share the project and link it here, please?
simpsonsmaster
Scratcher
50 posts

One sprite won't run when another sprite is running certain code

https://scratch.mit.edu/projects/1186633638/
The code is kind of a mess rn. When Player 456 is running, Player won't.
simpsonsmaster
Scratcher
50 posts

One sprite won't run when another sprite is running certain code

After more testing, I believe it only affects lists. I still don't know how to fix it though.
TimothyLawyer
Scratcher
1000+ posts

One sprite won't run when another sprite is running certain code

The players are still moving but slowly. Show the “player num” variable watcher in Player to see the changing in timing. To fix, put the “repeat (455)” loop in a custom block with run without screen refresh turned on.
simpsonsmaster
Scratcher
50 posts

One sprite won't run when another sprite is running certain code

Thanks!

Powered by DjangoBB