Kormus's Recent Forum Activity

  • Awesome. Thank you. I think you got me where i needed to go.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply!

    I have this part currently: [quote:15sbfmee]question Q is 5,0 in array then A = 5,1

    I understand this part, but unsure how to structure that reasonably well in C2: [quote:15sbfmee]check the outcome does not equal A then use that for B. Do the same to generate C, making sure it is not the same as A or B, and for D make sure it does not match A, B or C.

    and not clue on this part in C2: [quote:15sbfmee]Then assign A, B, C and D randomly to 4 numbers 1, 2, 3 and 4 that match the answers boxes.

  • 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!

Kormus's avatar

Kormus

Member since 16 Aug, 2016

None one is following Kormus yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies