sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Implementing Script Problem

    Scheduled Pinned Locked Moved SketchyPhysics
    7 Posts 3 Posters 553 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

                  Error 404 (Not Found)!!1

                  favicon

                  (sketchup.google.com)

                  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