semi-random rotate selected

Hi,

I'm really new to script, in fact I just find that scripting for max exists !

So I'm trying to random rotate object but based on selected value, let me explain :

I select many shutters(it can be box, teapot whatever), and i want them to be ramdomly rotate/open but I olso want them to be chosen angle 15, 30, 45 , 60 or 90 ° angle not a fully random angle (I succeed doing a fully random).

hope someone do understand what I wrote, i'm french, to write in english is really hard.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pfbelesa's picture

please explain the array

please explain the array formula

Anubis's picture

this is mentioned in a few

this is mentioned in a few topics here.
here is the last one i remember:
http://www.scriptspot.com/forums/3ds-max/general-scripting/rotate-uvwmap...

the epigram answer:

a = #(-90, -45, 45, 90)
r = a[random 1 4]

my recent MAXScripts RSS (archive here)

Hani Tiby's picture

I would think to put the

I would think to put the values i want into an array,
then while running the loop on the selected objects,
randomly call the value from the array.
good luck.

1acc's picture

for example - use my

for example - use my superpainter for this.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.