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 / 2 questions

Author
Message
GMX
19
Years of Service
User Offline
Joined: 19th Sep 2005
Location: In front of my monitor
Posted: 7th Oct 2005 02:36
Hi, it's me again...

I have only 2 questions this time.

1) Randomize. I know you need this to make random actually random over time, but I don't really know where to put it or what value to set it to. I know it needs a random value, but if I haven't done randomize then the random function put into randomize won't be random, it's really a catch 22 thing...

2) How can I tell if, when the mouse is clicked, the mouse would be clicking "on" a 3d object? Myst style...where you can click on 3d objects and something happens?

Hey, I'm still a newb, so expect lots of questions from me.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th Oct 2005 02:58
Heckno
20
Years of Service
User Offline
Joined: 8th Sep 2004
Location: Palm Coast, FL
Posted: 7th Oct 2005 03:03
Quote: "RANDOMIZE
The RANDOMIZE command reseeds the random number generator. If the random number generator is not reseeded the RND() command
can return the same sequence of random numbers. To change the sequence of random number every time the program is run, place a
randomize statement with an integer number at the beginning of the program and change the value with each run."


from the help commands included with DB

1. most people will use the randomize timer() command; which sets the seed according to the system time, i place it outside of the main program loop...

Quote: "PICK OBJECT
This command will return the Object Number of the closest object at the specified screen coordinates. The objects that are tested
against the 2D coordinate are only those within the Object Start and Object End range in order to speed up specific tests. If no object
exists at the coordinate, a value of zero is returned. If an object number is returned, additional data will be generated and stored
internally. This extra data can be retrieved using the GET PICK VECTOR and GET PICK DISTANCE commands.

SYNTAX
Return Integer=PICK OBJECT(Screen X, Screen Y, Object Start, Object End)"



2. your gonna have to play a bit with this one, cause army of darkness is back on and it's sac-religious to miss a Bruce Campbell flick....

Login to post a reply

Server time is: 2024-11-27 16:47:34
Your offset time is: 2024-11-27 16:47:34