sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Implementing Script Problem

    Scheduled Pinned Locked Moved SketchyPhysics
    7 Posts 3 Posters 596 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MrPlanet
      last edited by

      I need a script like

      if frame==350 then run script [1,5,3,9,2,3,1,0][(frame/50)%50];end;
      

      Anyone know the solution?

      I reject your reality and substitute my own.

      1 Reply Last reply Reply Quote 0
      • P Offline
        phy
        last edited by

        if frame==349;[1,5,3,9,2,3,1,0][(frame/50)%8];end
        

        That should do it. frame==350 does not work for some reason.

        Tableau de comparaison de Staxyn s'agit d'un mГ©dicament uniquement sur ordonnance.

        1 Reply Last reply Reply Quote 0
        • P Offline
          phy
          last edited by

          Hmm actually it doesn't work not sure why though it should.

          Tableau de comparaison de Staxyn s'agit d'un mГ©dicament uniquement sur ordonnance.

          1 Reply Last reply Reply Quote 0
          • P Offline
            phy
            last edited by

            there that works

            if frame>=350;[1,5,3,9,2,3,1,0][(frame/50)%8];end
            

            Tableau de comparaison de Staxyn s'agit d'un mГ©dicament uniquement sur ordonnance.

            1 Reply Last reply Reply Quote 0
            • B Offline
              BTM
              last edited by

              I don't know exactly why it doesn't work, it's probably just trying to do the action ON the frame 350/ 349, but here's how to make it work:

              ... Put this in the joint controller field

              getVar("whats")*[1,5,3,9,2,3,1,0][(frame/50)%8]
              

              ... And this in any onTick box

              if frame==350 then setVar("whats",1);end;
              

              ...Oh, Phy got to it first 😆
              and his doesn't need an onTick field 👍

              1 Reply Last reply Reply Quote 0
              • M Offline
                MrPlanet
                last edited by

                THANKS A LOT!

                I reject your reality and substitute my own.

                1 Reply Last reply Reply Quote 0
                • M Offline
                  MrPlanet
                  last edited by

                  Thanks everyone, i used your help on this model

                  http://sketchup.google.com/3dwarehouse/details?mid=3459b385de291d695e28caa3b26a73fd

                  I reject your reality and substitute my own.

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement