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.

DarkBASIC Discussion / random questions.

Author
Message
loftin
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 23rd May 2007 18:22
i am making a math game in which you have to answer questions and i have been trying to find a way to have random questions asked. would i be able to just place each of the questions along with their answers in a different section and then at the end of each section have it go to a random section between # and #?

yo!
Comrade Robski
20
Years of Service
User Offline
Joined: 12th Sep 2005
Location:
Posted: 23rd May 2007 19:29 Edited at: 23rd May 2007 19:31
An easier way might be to store the questions and answers in arrays and read a random entry in the array.

e.g.



EDIT: Use a loop if you want multiple questions to be asked
MikeB
19
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 24th May 2007 01:33
For my maths game I did something like this.



This is not the whole code, just some snippets that could prove useful .

E.D.

Login to post a reply

Server time is: 2026-07-06 03:59:52
Your offset time is: 2026-07-06 03:59:52