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.

Author
Message
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 27th Feb 2003 04:56
I have made a 3d pong that works. I want it so when the ball goes past the player, it will restart. How do I do this?

heres the code


one more problem is when the score goes up, it goes up by 3. Any idea how to fix that? thanx in advance.

Bishop
"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 27th Feb 2003 07:49
Hmm, this probably isn't the best answer to the problem but I'd just use Gosub to go back up to the top, some variables may need to be seperated like the score though. So:



Will work. This is what I did:
-Added Reset Label up the Top
-Put the Default Score varaible above reset label
-Created an out of bounds collision below 'Stop Player'

There you go, again, it's probably not the best thing to do because I'm still quite new. But it works.

I'm guessing that you're getting 3 points because essentially the ball's hitting the paddle in 3 different places everytime they collide. Not sure how to get around that one. That's a pretty good game, well done.

"Computers are useless they can only give you answers."
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 28th Feb 2003 02:03
thanx Exeat.
I tried putting it on top before, but all the objects already existed. Thanx alot.

one more question though.
how do I make it so if you hit it at different speeds, it will deflect differently? thanx in advance.

Bishop

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 28th Feb 2003 03:42
OK, you would have to find the angle of the ball hitting the wall, and then set the object off in the opposite angle. I hope you get it, good luck with 3D pong!!

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 28th Feb 2003 03:43
Oh btw you would do this by when your object is at the position when collision occurs then you read the objects rotation/angle and then rotate the object however it needs to be then move the object using your 'bounce' code

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!

Login to post a reply

Server time is: 2024-11-24 04:30:37
Your offset time is: 2024-11-24 04:30:37