Hi everyone could anyone help me with something
i have made a basketball game and i want the ball to bounce off other sprites can anyone give me a script please
Thanks (i will credit you in the game)
Offline
Uh maybe this project could help you? It has a ball in it that bounces with perfect angles (If you do use the code in that project, don't give credit to me as I didn't make it)
Offline
Jonathanpb wrote:
Uh maybe this project could help you? It has a ball in it that bounces with perfect angles (If you do use the code in that project, don't give credit to me as I didn't make it)
Thanks for the link unfortunately it didn't work
Offline
By the way it is click and drag ball if it helps
Offline
Do you mean you drag the ball with your mouse and when you let go the ball continues moving?
Offline
MoreGamesNow wrote:
Do you mean you drag the ball with your mouse and when you let go the ball continues moving?
Yes it is like that
Offline
I've never done it, but I'd start by recording mouse x and y positions from when the ball is clicked to until it is released. Then find the speed and direction based on those coordinates.
Offline
try this you may not find some of the blocks but it should work[blocks]<when green flag clicked><forever><if><touching[sprites <point in direction( << <not> >>sprite touched <move(20 )steps><end>[/blocks]
____________________________________________________________________________________
play my games using this link http://scratch.mit.edu/users/legoguy23
Offline
fortmcas wrote:
If touching sprite _____, than if on edge bounce, or could be replaced with: turn ___ degrees, and move ___ steps
Hope this helps
I know this wouldn't work because when it says if on edge bounce it means on the edge of the screen
Offline
nrgjay101 wrote:
i'm making a proect and i don't know how to make the ball bounce off the paddle
Post a new thread if you have a question. It helps keep the forums more organized
Edit: this thread/post might help you
Last edited by MoreGamesNow (2012-08-25 20:29:45)
Offline