Computer Science Canada

Need help asking random questions in a trivia game.

Author:  jays13 [ Mon Jun 01, 2009 3:10 pm ]
Post subject:  Need help asking random questions in a trivia game.

I'm making a trivia-style game and don't know how to pick a random question to ask. I think I can do this by having a file with a bunch of questions in it and randomly asking them, but I'm not sure...

Any help would be appreciated Very Happy

Author:  Euphoracle [ Mon Jun 01, 2009 3:21 pm ]
Post subject:  RE:Need help asking random questions in a trivia game.

You can load all the questions into an object or record type array and swap them with random indices within the bounds of the array and then play it through normally.

Author:  jays13 [ Mon Jun 01, 2009 3:24 pm ]
Post subject:  Re: RE:Need help asking random questions in a trivia game.

Euphoracle @ Mon Jun 01, 2009 3:21 pm wrote:
You can load all the questions into an object or record type array and swap them with random indices within the bounds of the array and then play it through normally.



Is there a link where I can learn about these things?

Author:  Dusk Eagle [ Mon Jun 01, 2009 3:36 pm ]
Post subject:  Re: Need help asking random questions in a trivia game.

Check out The Turing Walkthrough. You can find everything you'll need to do this there.

Author:  jays13 [ Mon Jun 01, 2009 3:45 pm ]
Post subject:  RE:Need help asking random questions in a trivia game.

I've spent hours already reading the walkthrough before I made an account and can't seem to understand what to do...

Author:  DemonWasp [ Mon Jun 01, 2009 3:49 pm ]
Post subject:  RE:Need help asking random questions in a trivia game.

Read about Records and Types and think about it. You won't find instructions on how to make a quiz-type game, however.


: