Greetings all, although I have posted here before I have only just recently started programming in DBPro.
Heres my dilemma:
I am trying to program a small program to randomize numbers as a virtual dice pool.
The problem is the RND() command is not entirely random and the RANDOMIZE X command requires a differnet value evry time to make it entirely random. I would like to make it so that the X value fore the randomize command is different every time the program starts and therefore generates truly random numbers.
Any help would be greatly appreciated.
The code goes something like this (the original is at home and not with me where I'm posting from)
Randomize
Print "Welcome to the RDR (Random Dice Roller) by Incandescant"
wait 1000
Input "How many sides would you like your die to have?>";s
if ( sides > 0 )
print rnd(s - 1) + 1
wait 5000
Another problem is I would like the code to loop so that once a user has had a result printed to the screen it will then start again (after a key has been pressed) from the input prompt.
Thirdly note the wait command at the end, the option to terminate the program with a key stroke and keep the display open till then woul;d be useful. I know it would be done with the sendkey() command but can't figure out how.
I know this may seem simple to most and that I am asking you to basically code the program foe me but it is my first DB program and I am stuck. I also intend to add a lot more functionality, flair etc such as rolling dice animations and the feature of rolling multiple die.
Thanks to anyone who helps!!!
Incandescant
System: Athlon TBird 800Mhz, 320MB RAM, GeForce 2MX440, DX8.1