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.

Author
Message
AdamGM
4
Years of Service
User Offline
Joined: 13th Jun 2015
Location:
Posted: 14th Jun 2015 22:08
Hi all,
working on something like a Trivia game.

This is my thought on how to do it, can you let me know if there's a better way?

I want to have some options, where questions from category A are included if box A is checked, from category B if box B is checked, etc.

I'm writing questions from each category into a new file, and giving each one an integer ID. Then, use the random (from,to) command to pick a question.

I'm also planning on using another random command within each question to include 2 random false answers, to make the options different each time.

Any help is appreciated!
AdamGM
4
Years of Service
User Offline
Joined: 13th Jun 2015
Location:
Posted: 15th Jun 2015 00:12
...did a mod delete the text of my post or something?
David Gervais
Retired Moderator
13
Years of Service
User Offline
Joined: 28th Sep 2005
Location: Montreal, Canada
Posted: 15th Jun 2015 03:33
Quote: "...did a mod delete the text of my post or something? "


No posts were deleted, new members of the forums need their posts approved by a mod for the first few days, in part to catch spam bots that create accounts just to spam ads.

This is not the case for you, just have a little patience and the annoying 'pending approval' thing will soon disappear.

Oh and welcome to the forums.

Cheers!

BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Jun 2015 12:00
I have a long-running project doing something similar.
It's very complex because I'm including many other features.

But for the questions and answers I use a spreadsheet with up to 6 wrong answers and 1 correct one. I export them to a csv and import them into the game. I shuffle the wrong answers in an array, then select the first 2 from the array. Shuffling the answers gives you more scope than hardcoding 2 random picks. For example, if you later decide you want 3 wrong answers rather than 2.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2019-07-23 10:57:19
Your offset time is: 2019-07-23 10:57:19