I can make a ball bounce around the screen, but how would i make it bounce of of objects, such as other images?
Thanx
Steve
------------------
Printable View
I can make a ball bounce around the screen, but how would i make it bounce of of objects, such as other images?
Thanx
Steve
------------------
Steve can I get a copy of the code to bounce around the screen. I have a school project and have to do a game. Any help will be greatly appreciated. Thanks
Jason
Wow how old is this post? :D
use this ... imgBall is the ball...
Code:'PUT THIS IN FORM LOAD
dim x as integer
dim y as integer
x=75
y=75
'PUT THIS IN A TIMER
imgball.top = imgball.top + y
imgball.left = imgball.left + x
if imgball.top < = 0 or imgball.top >= (form1.height-imgball.height - 30) then
y = y *-1
elseif imgball.left< = 0 or imgball.left >= (form1.width- imgBall.widht) then
x = x *-1
end if
Is this what you wanted?:D My attatchment is a must have for you - check help for abs function!;)
Hey, thanks a bunch. That looks like it will help me out well.
Jason