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.

Newcomers DBPro Corner / Magic 8-Ball

Author
Message
luther
19
Years of Service
User Offline
Joined: 1st Feb 2005
Location:
Posted: 1st Mar 2005 00:03
Hey everyone... I'm trying to make a little program that will work like a magic 8-ball, and randomly provide a response to yes or no questions. I don't know how to apply an 8-ball to a sphere or model it, really, at all... i'm a complete n00b with 3d things and barely better with 2d. I have a little spinning cube, but I can't figure out how to make it respond correctly when i hit a key and without making it not spin... it looks like this...

Okay... you can see that it will go to a process called 'random' when you hit enter, but I don't know how to make 'random' actually recall a random answer to a yes or no question or make it display properly.
Any help would be greatly appreciated... thanks in advance.
Oh, and btw, this is basically inspired by the DBP little thing "My first spinning cube program." ... lol

I'm new to programming, sorry if I sound like a stupid N00B.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 2nd Mar 2005 09:56
here is some code to try

the NUMBER represents however many responces you want to have.in this example, i had 2 but left it out for the sake of the reader.

I am sure that there is a better way of doing this but this works.

note: you will have to use if/then commands for each responce
walkman
19
Years of Service
User Offline
Joined: 27th Feb 2005
Location:
Posted: 4th Mar 2005 00:26
Here is a program to display an 8-Ball.
Make Object Sphere 1, 10

Load Image "8Ball.bmp", 1

Texture Object 1, 1

Do
YRotate Object 1, WrapValue(Object Angle Y(1) - MouseMoveX() )
XRotate Object 1, WrapValue(Object Angle X(1) - MouseMoveY() )
Sync
Loop

The trick is in 8-Ball.bmp.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-09-23 13:27:02
Your offset time is: 2024-09-23 13:27:02