im making a triva game in VB6. Every question is on a different form... i have the random code, but how can i make it so that it wont show a form i have already answered?
: im making a triva game in VB6. Every question is on a different form... i have the random code, but how can i make it so that it wont show a form i have already answered?
: please help.....
Well you could add the question number you've already answered to a list and then if the random number equals any on the list, generate a new one.
: im making a triva game in VB6. Every question is on a different form... i have the random code, but how can i make it so that it wont show a form i have already answered?
: please help.....
you could set up a webcam, and film a lavalamp. Then acces the webcam image in your program, and interpret the data. I dunno, just try some weird algorithm, or just take a few random points in the image and take the average value or whatever. This way you will never get the same string of random values, and they can never be predicted.
this would mean you have to ship a lavalamp and a webcam with every game you sell though ...
: : im making a triva game in VB6. Every question is on a different form... i have the random code, but how can i make it so that it wont show a form i have already answered?
: : please help.....
: Well you could add the question number you've already answered to a list and then if the random number equals any on the list, generate a new one.
: -Xotor-
....and then you don't need a lava lamp! Those things are expensive!
: : : im making a triva game in VB6. Every question is on a different form... i have the random code, but how can i make it so that it wont show a form i have already answered?
: : : please help.....
: : Well you could add the question number you've already answered to a list and then if the random number equals any on the list, generate a new one.
: : -Xotor-
: ....and then you don't need a lava lamp! Those things are expensive!
What I do in situations like this is to create a vector containing all the numbers (in this case your trivias). When I fill this vector I do it in a randomized order. Then all you have to do is pick the last question and decrease the vectors range! I use this to create a deck of cards when I dont want the same card to turn up again!
Comments
: please help.....
Well you could add the question number you've already answered to a list and then if the random number equals any on the list, generate a new one.
-Xotor-
: please help.....
you could set up a webcam, and film a lavalamp. Then acces the webcam image in your program, and interpret the data. I dunno, just try some weird algorithm, or just take a few random points in the image and take the average value or whatever. This way you will never get the same string of random values, and they can never be predicted.
this would mean you have to ship a lavalamp and a webcam with every game you sell though ...
maybe I should stop ranting now )))
/inopia
: : please help.....
: Well you could add the question number you've already answered to a list and then if the random number equals any on the list, generate a new one.
: -Xotor-
....and then you don't need a lava lamp! Those things are expensive!
: : : please help.....
: : Well you could add the question number you've already answered to a list and then if the random number equals any on the list, generate a new one.
: : -Xotor-
: ....and then you don't need a lava lamp! Those things are expensive!
What I do in situations like this is to create a vector containing all the numbers (in this case your trivias). When I fill this vector I do it in a randomized order. Then all you have to do is pick the last question and decrease the vectors range! I use this to create a deck of cards when I dont want the same card to turn up again!
Good luck!
/Trixter