Good Afternoon,
I just recently bought Construct2 and am banging my head against the wall. I am used to writing code such as C# and have been struggling with the Event based system in Construct.
To train myself, I am creating a trivia based game but am really confused on how best to implement the functions/loops.
Here is my basic setup:
- I have a two dimensional array with a series of questions and answers. Each question has an associated correct answer.
- I would like to display a random questions and a multiple choise consisting of the correct answer and three incorrect answer chosen from answers to other questions.
For example) Question 1 - Answer choice 1 (correct answer from question 2), Answer Choice 2 (correct answer to question 1), etc, etc.
How I have it structured now:
- I have a layout with a test (questions) and four answer buttons.
- I have the two dimensional array that contains all the question/answer pairs.
- I have a function that generates a random number and displays the question.
- I need to figure out how to create a structure that would allow me to select the correct answer and three incorrect answers (from the other questions) and display them in random order across the 4 buttons. - this is where i am stuck.
Bonus question: I don't know if this is a reasonable way to accomplish this.
- To remove an already displayed question, I have created a second array as a copy of the original and when a question is chosed, I am removing it from that array. That way when i generate the next random question, the previously used question will not be available to be chosen.
- I then am pulling the incorrect answers from the original array so i don't run out of incorrect answer options.
Anyways, I could do this quickly in C#, for example, but am banging my head against a wall here. Any help would be appreciated!