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

    Mid-simulation controls

    Scheduled Pinned Locked Moved SketchyPhysics
    4 Posts 2 Posters 511 Views 2 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.
    • P Offline
      phy
      last edited by

      I was making a simple ball game and made controls for the power and aim of the pitch. I accidentally made a slider in mid-simulation. 😉 After I pitched the slider showed up and I could control it. I just used this code:

      if key("p")==1; 49+slider("strength")*5;else 0;end
      

      (in the emitter's strength)
      how do I make it show up right away?

      Here's the file
      p=pitch h=hit


      ball

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

      1 Reply Last reply Reply Quote 0
      • H Offline
        hpnisse
        last edited by

        if I understand you right you want the slider("strength") to show up direct when the simulation starts:

        put this code in "onthick" in some object(wherever you want:D)

        
        if frame==0
        slider('pitching strength')
        end
        
        

        hope this was the stuff you search for.

        ` /hpnisse`
        ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

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

          Oh yeah duh I was kinda dumb didn't enter my brain 😳 😕 thanks

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

          1 Reply Last reply Reply Quote 0
          • H Offline
            hpnisse
            last edited by

            Thats OK... 👍

            ` /hpnisse`
            ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

            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