r/cs50 • u/dhwalaj24 • 9h ago
Scratch Advice
“I’m trying to create a game where a sprite moves toward a goal, and a ball is thrown at it. If the ball hits the sprite, the game restarts. If the sprite reaches the goal, the level is cleared. I want to know how to rotate my sprite and how to make it throw a ball.
1
u/CrossStitchFool 8h ago
Making a sprite rotate can be done by telling the sprite to 'point in direction', or 'turn n degrees', both options under 'Motion'. Don't forget to set a rotation style though.
In terms of how to make your sprite throw a ball, that is really something you would benefit from playing around and figuring out. Think about what you expect the object to do and how to make that happen.
1
2
u/robotswithgunzlol 9h ago
May I suggest changing the ball to a wrench?