hello,
I have a problem with random values : I write
-------
for bbb = 1 to 12 do
(
a=#(0,0,0,0,0,10,10,10,10,10,10,10,10)
print ( random a[1] a[bbb])
)
---------
when execute I have :
0
0
0
0
0
0
9
10
2
8
1
10
OK
why don't I have just 0 and 10 value as result ?
Thanks for help.
Comments
.
The way that you use it the rando generates values between 0(a[1]) and the value of bbb, which is from 1 to 12, so you will have random values 4, 6, 7, 2,
To have only 0 or 10, the elements in the A array use this:
The random generated value must be used as index of the A array, so do not use a[1], because it is 0 and maxscript array are 1-based.
Tools and Scripts for Autodesk 3dsMax
Thanks Miauu, sometimes I
Thanks Miauu, sometimes I Wonder if I have a brain...
.
Not only you have such thoughts. :)
Tools and Scripts for Autodesk 3dsMax
:-)
:-)