So to paint you a picture on what I’ve done:
I have an XML question base where both questions and the answers are stored. Right now I’m running a simple for loop which loads the first question and I increment it by 1 with each given answer. What I would like to actually do is generate a random question but also make sure that question never repeats again until all questions have been looped/answered.
All I can think of is to reload the list without the question that has been answered but I was hoping there might be a simpler and more optimized solution to this.
Thanks for the help in advance!
GUI.Label (new Rect (Screen.width / 2 - 275, 280, 550, 75), t.Questions[p].question);
if(t.Questions[p].type.Equals("button")){
for(int i=0;i<t.Questions[p].answers.Count;i++)
{
if (GUI.Button (new Rect (Screen.width / 2 - 275, 350+i*35, 550, 30), t.Questions[p].answers*.answer))*
-
{*
_ if(t.Questions[p].answers*.correct==true){_
_ p++;_
_ }_
_ else{_
_ lives–;_
_ }_
_ }_
_ }_
_ }*_