Random list

Get help using Construct 2

Post » Mon Oct 29, 2012 5:12 am

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.
B
12
S
3
G
4
Posts: 55
Reputation: 3,186

Post » Mon Oct 29, 2012 5:47 pm

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 belowkeepee2012-10-30 00:24:20
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Mon Oct 29, 2012 7:27 pm

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
B
79
S
24
G
53
Posts: 4,732
Reputation: 40,227

Post » Tue Oct 30, 2012 12:51 am

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!keepee2012-10-30 00:53:27
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Tue Oct 30, 2012 1:59 pm

Thanks for your help! I appreciate it!
B
12
S
3
G
4
Posts: 55
Reputation: 3,186


Return to How do I....?

Who is online

Users browsing this forum: Bad Wolf, cesisco, davides, NRABrazil, Vallar, WhosWho and 30 guests