|
-
Aug 7th, 1999, 03:48 AM
#1
Thread Starter
Frenzied Member
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
------------------
-
Apr 2nd, 2001, 08:14 PM
#2
New Member
bouncing ball
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
-
Apr 2nd, 2001, 08:22 PM
#3
Thread Starter
Frenzied Member
Wow how old is this post? 
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
-
Apr 4th, 2001, 02:00 PM
#4
check this!
Is this what you wanted? My attatchment is a must have for you - check help for abs function!
-
Apr 4th, 2001, 11:22 PM
#5
New Member
RE: Bouncing Ball
Hey, thanks a bunch. That looks like it will help me out well.
Jason
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|