Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Need help with ball bounce

Author
Message
Daniel wright 2311
User Banned
Posted: 21st May 2012 05:07 Edited at: 21st May 2012 05:09
Ok, so,I have everything set up, I am using sparkys ball bounce function. What I do is if I press a for aim then click my mouse button,the ball shoots at the wall then bounces,but here is the problem,it only shoots backwards then bounces,if I move the ball forward -8 then the ball sticks to the wall,so it only shoots backwards at +8 to work. Here is my code.



my signature keeps being erased by a mod So this is my new signature.
zeroSlave
17
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 21st May 2012 05:48
Quote: "MOVE OBJECT 20,8"
Quote: "and here is the function for the ball bounce,I am guessing it is the fact It is repositiong the ball at a +number"

That is more than likely what is causing the issue. You'll either want to move it at a smaller increment, or just do a IF ballX > wallX check.

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.

Login to post a reply

Server time is: 2026-07-22 00:34:17
Your offset time is: 2026-07-22 00:34:17