0

I would like several sprites to move from left to right on a loop and start at different time.

Although I have used the "forever" control feature, it's not working. the sprites (baseball and basketball) stop at the right edge of the screen. In this specific case, I'm trying to put together a baseball challenge where the the player has to move the Batter up and down the screen and hit only the baseball not the basketball or any other distractor coming from the left side of the screen. https://scratch.mit.edu/projects/882521422/

3
  • 2
    The basketball has no if touching edge code to wrap it back to the left-hand side of the stage, so it keeps going to the right, stopping only at Scratch's own demand to keep at least 30 pixels visible. The baseball does have that code, but it prevents the ball from entering the stage because 'touching edge' also applies to the left edge. Besides, you made the baseball invisible. I suggest you play around a bit longer to get a better understanding of Scratch's mechanics. Commented Aug 14, 2023 at 17:50
  • That was very helpful. Thanks a lot. I added a line on the right side of the screen so that I could specify "if touching line", which solved the problem. Everything was working fine until I added the "Win" block and since then, the whole thing has not been working anymore. Commented Aug 16, 2023 at 6:59
  • Well done, your game works fine. You just need to show the basketball as well as the baseball when green flag clicked. Do not assume the project will automagically initialize your sprite's position/direction/visibility; always do so yourself. If you need any more support on this project, then please refer to the "Help with scripts" forum; Stack Overflow is not a collaborative coding platform. Commented Aug 16, 2023 at 7:25

1 Answer 1

0

try adding this to your balls.

add this code.

Sign up to request clarification or add additional context in comments.

1 Comment

sorry if this is a little short. I don't know what else to include.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.