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.

Dark GDK / Output of dbRandomize

Author
Message
Cooldude
17
Years of Service
User Offline
Joined: 10th Nov 2007
Location:
Posted: 28th Nov 2007 18:36
Hey,
How do I find out what the output of dbRandomize is??
Like let's say I want to place a square out of three squares then I make my command:

dbRandomize ( 3 );

As far as I know at the time this makes a random number between 1 and 3. But How do I find what the random number is????

HELPPPPPPPPPPP!!!!!!!!!!!!!!!!!!!!!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Nov 2007 19:14 Edited at: 28th Nov 2007 19:14
Hey I think you went too fast over the documentation.

Use dbRnd to get a random number :



Use dbRandomize to change the random seed generation number (don't use it too often or your random numbers will become not so random, just once at the begining of the code should be fine):



As you see, dbRandomize returns void, that means it doesn't return any value at all.
Cooldude
17
Years of Service
User Offline
Joined: 10th Nov 2007
Location:
Posted: 28th Nov 2007 19:49
Hey,
Morcilla I still don't see how to get the result of what the random number turned out to be. I need to use it to display a random sprite. It seems like it works the same as dbRandomize!!!

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 28th Nov 2007 20:20
You do a thing called returning a value:



http://www.cplusplus.com/doc/tutorial/

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)

Login to post a reply

Server time is: 2024-11-19 17:23:41
Your offset time is: 2024-11-19 17:23:41