Announcement

Collapse
No announcement yet.

Randomize instanced doors open values

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

  • Randomize instanced doors open values

    can it be done, since i have several instances of one door?

    i can call a random value for the entire selection ($.open = random 1 100
    ), but i can t get random values for each instance within the selection...

    I know i have been helped before but, i can t figure this out....again
    Nuno de Castro

    www.ene-digital.com
    nuno@ene-digital.com
    00351 917593145

  • #2
    If the doors are instanced copies I doubt you can do it, but if they are just unique copies it's easy enough.

    The problem with your script is that you are generating a single random value and assigning it to all the doors, you should calculate a different one for each door:
    Code:
    for o in selection do o.open = random 1 100
    Cheers.

    Comment


    • #3
      Or use TransformRandomizer from soulburn's scripts.

      Comment


      • #4
        Originally posted by Codi View Post
        If the doors are instanced copies I doubt you can do it, but if they are just unique copies it's easy enough.

        The problem with your script is that you are generating a single random value and assigning it to all the doors, you should calculate a different one for each door:
        Code:
        for o in selection do o.open = random 1 100
        Cheers.
        unfortunately they were instances...i made each one unique....

        Originally posted by duke2 View Post
        Or use TransformRandomizer from soulburn's scripts.
        it can rotate, scale and move them, but cannot define opening %...or can it?
        Nuno de Castro

        www.ene-digital.com
        nuno@ene-digital.com
        00351 917593145

        Comment


        • #5
          Originally posted by ene.xis View Post
          unfortunately they were instances...i made each one unique....
          Mmmh, I don't understand.
          If you made them unique they are no longer instances so the sript should work. Have you tried it on your scene?

          Comment


          • #6
            lol...
            i needed it done yesterday! so the only way i figured it out was to make them unique to get it done....
            thanx
            Nuno de Castro

            www.ene-digital.com
            nuno@ene-digital.com
            00351 917593145

            Comment


            • #7
              Doh, I see ... well, maybe next time will help

              Comment


              • #8

                ...Thanks!
                Nuno de Castro

                www.ene-digital.com
                nuno@ene-digital.com
                00351 917593145

                Comment


                • #9
                  If each door is different how could they be instances? You'd have to collapse doors into static and rotating part and instance those. Then you could randomize rotation between them.
                  http://www.ylilammi.com/

                  Comment


                  • #10
                    Originally posted by MasterBercon View Post
                    If each door is different how could they be instances?
                    different? why do u assume that? they are bifold doors that share the same with, height, thikness, and so on...i just needed to randomize their opening values.

                    Originally posted by MasterBercon View Post
                    You'd have to collapse doors into static and rotating part and instance those. Then you could randomize rotation between them.
                    yep, thats indeed the proper way to do it...next time i will give it a go! thanks!
                    Nuno de Castro

                    www.ene-digital.com
                    nuno@ene-digital.com
                    00351 917593145

                    Comment

                    Working...
                    X