Random list

0 favourites
  • 5 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • I'm trying to recreate a typical multiple choice test - the idea is:

    out of a larger set of unique values, I have to pick 4, with one of them being a particular value, others being other random variables in the set. The 4 also have to be unique (can't pick the same option twice in any given event)

    This is working for the most part, but it's giving me the same values for the 4 options (except for the particular value, which may or may not be the same as the other options)

    If someone could take a look at my capx, I'd appreciate it.

  • Okay I started something from scratch,

    It's kind of a mess, but it's only 5 events, and meets your criteria.

    The correct answer always shows up at a random position

    Other answers are random from a list, and none are repeated

    Plus you can optionally set up to 10 different choices instead of just 4, and label them however (A,B,C,D,E,F,G.. or 1,2,3.. etc)

    Obviously you'll want this for multiple questions, in which case you need to replace the "answers" string with an Array, with each row being another question...

    I'm pretty tired and there's probably a way to simplify this a lot more, but I thought I'd give you what I have so far with annotations in case it helps.

    Link!

    Edit: updated version in the post below

  • Keepee beat me to it but here is another way to do it

    http://dl.dropbox.com/u/5426011/examples15/answers_from_a_set.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • updated my version

    It uses an array now:

    You can copy and paste the Questions and Answers from a spreadsheet like this:

    Pic!

    works with any number of answers now for each question, as long as the array is set to the right size.

    capx!

  • Thanks for your help! I appreciate it!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)