• Login
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 1 May 2009, 18:47

    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 2 May 2009, 01:23

      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 2 May 2009, 01:54

        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 2 May 2009, 01:58

          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 2 May 2009, 02:03

            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 2 May 2009, 07:24

              THANKS A LOT!

              I reject your reality and substitute my own.

              1 Reply Last reply Reply Quote 0
              • M Offline
                MrPlanet
                last edited by 2 May 2009, 14:35

                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
                1 / 1
                • First post
                  4/7
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement