You could store each number in that range in a list.
Offline
I'm not too sure what you want, I think you should word it better, so you can't blame me if I got this wrong. I'm thinking you want something that picks a number from a random range, right?
Example: make three variables, v1, v2, and v3. v3 is the final number you receive.
Note: the >* means greater than, not showing boolean.
Set variable [v1] to <pick random 1 to 10>
=Repeat until (<[v2]-[v1]> >* 0)
|Set variable [v2] to <pick random 1 to 10>
====[end repeat]===========
Set [v3] to <pick random [v1] to [v2]
Offline
scratchU8 wrote:
Im not gonna blame you for anything. What I want is something that only allows the numbers in that range. Not just 1 number in the range. All of 'em.
So you want a block that contains all the numbers in the range, right?
Then store them all in a list.
If you want to check if a number is in that range, have :
<if list [range] contains [#]>
Offline
scratchU8 wrote:
Im not gonna blame you for anything. What I want is something that only allows the numbers in that range. Not just 1 number in the range. All of 'em.
Do you mean all of the whole numbers in that range? If so, here is a script that puts all of those numbers in a list.
<~ when green flag clicked ~>
<~ set (n1) to (lowest number) ~>
<~ set (n2) to (highest number) ~>
<~ set (iterator) to (n1) ~>
<~ repeat until ([iterator] = [([n2] + [1])]) ~>
<~ add (iterator) to list (list) ~>
<~ change (iterator) by (1) ~>
<~ close repeat ~>
Last edited by HD123 (2010-12-12 14:37:38)
Offline