Trivia Game?

JamieOneilJamieOneil Member Posts: 877
edited June 2012 in Working with GS (Mac)
So, this is my first game using tables, I'm still getting used to them.
Im trying to make a trivia game where there is a question and 2 answers.

In the table i have 3 columns, The question, 2 possible answers, and the correct answer.

The correct answer column i a number, the number is the number of the column that is the correct answer.

i made an attribute called 'game.row'. I have 7 questions so i said to change 'game.row' to a random number between one and 7.
To display the random question i used 'tableCellValue( game.Questions TABLE , game.row ,1)'
and for the answer 1 'tableCellValue( game.Questions TABLE , game.column ,2)'
and answer 2 'tableCellValue( game.Questions TABLE , game.column ,3)'

This was working, showing the question and 2 possible answers.

I have been messing around trying to get it to display another random question if you get the correct answer, and if its wrong change to the Fail scene.
I don't know why, but i just can't figure out how to do it, so I'm assuming there may be something wrong with my table?

Thanks in advance.

Best Answer

  • HapiappsHapiapps Posts: 373
    Accepted Answer
    I have made a similar game recently. I have mine up so that all the questions are on one scene and they just switch to the next question when you click next. (Display Text: tableCellValue...) All of my questions are in the first column and the answers in the second, third and fourth column similar to you. I'm not sure how you set yours up though so if yours is a "touch is pressed" typed deal, just make it so if touched on the wrong answer, change scene to fail and if touch is pressed on right answer, move to the next question. I still don't know exactly how the answer is selected (touch etc.) so I can't explain too much more but I can take a look if you like.

Answers

  • JamieOneilJamieOneil Member Posts: 877
    Mind emailing me at jamieoneil97@hotmail.com
    I could send you the project file and if you have a chance you could take a look?

    I have it working a bit better now, except sometimes the correct answer won't work and both answers take you to the fail screen, i think its the way i have set it up.
Sign In or Register to comment.