macromedia.authorware
[Top] [All Lists]

Re: Random number generator help

Subject: Re: Random number generator help
From: "Chris Forecast"
Date: Thu, 13 Nov 2008 12:08:08 -0000
Newsgroups: macromedia.authorware

"dd4455" <webforumsuser@xxxxxxxxxxxxxx> wrote in message 
news:gfh3sh$mkj$1@xxxxxxxxxxxxxxxxxxxxxxxx
> Yes, I'm viewing on the web forum, and now it makes sense - and works 
> well.
> Thank you for your patience.
>
> Is there a way of changing the code so that the ResponseList is divided by 
> the
> groupsize before it randomises the results.  For example, if the EntryText
> value was 12, and the groupsize was 4, could the result be 4 groups of
> randomised numbers like:
> 1, 5, 8
> 9. 6, 11
> 12, 7, 4
> 2, 3. 10

If I understand you correctly, I guess you could change the line:

if MOD(j-1,groupsize)=0 then AddLinear(ResponseList,[])

to:

if MOD(j-1,INT(Number(TempString)/groupsize))=0 then 
AddLinear(ResponseList,[])

Chris Forecast 



<Prev in Thread] Current Thread [Next in Thread>