Announcement

Collapse
No announcement yet.

Maxscript: for loop question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Maxscript: for loop question

    Is there a way to use a for loop to cycle through a selection and randomly apply different (pre-made) materials to the objects? Ideally, i would actually make the materials in the interface and then call the names or variable names in the loop. Any help will be really, really appreciated!
    -----Dwayne D. Ellis-----

  • #2
    Something like this? Found it ages ago and use it on vegetation mainly.
    Attached Files

    Comment


    • #3
      Nice...that works! Thanks for the heads up!!!!
      -----Dwayne D. Ellis-----

      Comment


      • #4
        For anyone else who needs it...here is another solution.


        Code:
        for i in selection do i.material = meditmaterials[(random 1 3)]
        Lets you cycle through a selection assigning materials randomly from the specified slots.
        -----Dwayne D. Ellis-----

        Comment

        Working...
        X