Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

How to avoid duplicated random values?

$
0
0
So my initial thread got ignored (probably due to the fact that it was erroneously posted as a 'Discussion' and not a 'Question'), and the title question here was probably badly phrased. But let's try this again anyway, because I'm now at the point where I can't move forward until this is DONE.

How do I avoid this:
(set: $hss1_r to (either: 1, 2, 3, 4, 5, 6, 7, 8))
(set: $hss2_r to (either: 1, 2, 3, 4, 5, 6, 7, 8))
(set: $hss3_r to (either: 1, 2, 3, 4, 5, 6, 7, 8))
(set: $hss4_r to (either: 1, 2, 3, 4, 5, 6, 7, 8))
(set: $hssh_r to (either: 1, 2, 3, 4, 5, 6, 7, 8))
...giving me a set of numbers like this: 1,1,4,5,4

The point here is to send five 'kids' (hss1, hss2, hss3, hss4, and hssh) to different rooms, of which there are 8 to chose from.

I cannot have two kids in the same room. So while the formula for hss1 can pick from any of the 8 rooms, if it draws 4, how do I keep the others from drawing 4, and so on?

I was hoping to have Chapter 4 done already, but until I work out the hide'n'seek mini-game this set is meant to kick-start, I can't publish and unleash my testers on it. I've been stuck on this for two weeks now and would appreciate any help at all.

Viewing all articles
Browse latest Browse all 1844

Trending Articles