Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
I am fucked and need you're help (VB6 CODERS)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="St4nley" data-source="post: 211430" data-attributes="member: 31081"><p>TO MAKE A LONG STORY SHORT, FINAL PROJECT DUE MONDAY, AND I CHOSE THE WRONG GAME</p><p>so now i am making billards</p><p>and right now, im fucking stuck and i feel like a noob because i am</p><p> </p><p>how do i make a shape that is a ball stay remaining in one spot untill it is hit (billiards)</p><p> </p><p>[CODE]Private Sub Timer1_Timer()</p><p>imgball.Top = imgball.Top - goodVel</p><p>shpBall.Top = shpBall.Top - BallHVel</p><p> </p><p>'IF PLAYER BALL HITS BOTTOM</p><p>If imgball.Top + imgball.Height > Form2.ScaleHeight Then</p><p>goodVel = goodVel * -1</p><p>End If</p><p> </p><p>'IF GAMEBALL HITS TOP</p><p>If imgball.Top < 0 Then</p><p> goodVel = goodVel * -1</p><p>End If</p><p> </p><p>'IF GAME BALL HITS BOTTOM</p><p>If shpBall.Top + shpBall.Height > Form2.ScaleHeight Then</p><p>BallHVel = BallHVel * -1</p><p>End If</p><p> </p><p>'IF GAME BALL HITS TOP</p><p>If shpBall.Top < 0 Then</p><p> BallHVel = BallHVel * -1</p><p>End If</p><p> </p><p>'///////////////IF THE WHITE BALL HITS THE GAME BALLS\\\\\\\\\\\\\\\\\\\\\\</p><p>If imgball.Top < shpBall.Height + shpBall.Top Then</p><p> goodVel = goodVel * -1</p><p> BallHVel = BallHVel * -1</p><p>End If</p><p> </p><p>End Sub</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="St4nley, post: 211430, member: 31081"] TO MAKE A LONG STORY SHORT, FINAL PROJECT DUE MONDAY, AND I CHOSE THE WRONG GAME so now i am making billards and right now, im fucking stuck and i feel like a noob because i am how do i make a shape that is a ball stay remaining in one spot untill it is hit (billiards) [CODE]Private Sub Timer1_Timer() imgball.Top = imgball.Top - goodVel shpBall.Top = shpBall.Top - BallHVel 'IF PLAYER BALL HITS BOTTOM If imgball.Top + imgball.Height > Form2.ScaleHeight Then goodVel = goodVel * -1 End If 'IF GAMEBALL HITS TOP If imgball.Top < 0 Then goodVel = goodVel * -1 End If 'IF GAME BALL HITS BOTTOM If shpBall.Top + shpBall.Height > Form2.ScaleHeight Then BallHVel = BallHVel * -1 End If 'IF GAME BALL HITS TOP If shpBall.Top < 0 Then BallHVel = BallHVel * -1 End If '///////////////IF THE WHITE BALL HITS THE GAME BALLS\\\\\\\\\\\\\\\\\\\\\\ If imgball.Top < shpBall.Height + shpBall.Top Then goodVel = goodVel * -1 BallHVel = BallHVel * -1 End If End Sub [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
I am fucked and need you're help (VB6 CODERS)
Top