• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Pause a simulation to wait for input from Webdialog?

Scheduled Pinned Locked Moved SketchyPhysics
5 Posts 2 Posters 668 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.
  • M Offline
    mptak
    last edited by 30 Jun 2011, 13:41

    Does anyone have any insight into how to pause and then restart a simulation from inside of Ruby. Specifically I would like to pause the simulation and then get input from a webdialog. As usual all help is greatly appreciated. I am trying to gamify some knowledge quizzing for my kids and this appears to be the last piece which will make them earn the right to attempt the sketchy physics throw into the Bozo buckets.

    1 Reply Last reply Reply Quote 0
    • M Offline
      Mr.K.1
      last edited by 1 Jul 2011, 07:00

      Ya that's not too difficult, I'll whip up something just need to do some tests because these SP manipulations can quickly crash SU.

      BTW, do you have an existing HTML for the quizzes so I can link things directly to that?

      1 Reply Last reply Reply Quote 0
      • M Offline
        Mr.K.1
        last edited by 1 Jul 2011, 11:52

        Alright I put a little something together, took a small racing game and added question checkpoints.

        The important bits here are the yellow boxes, the small one has the HTML code and questions and the long ones are checkpoints that will pop up a webdialog and pause SP.

        @@questions = [["4+5+10*0 = ","9"],["Banana color","yellow"], ["The cake is a...", "lie"]]
        (small box)Here you can put in any question and result combo

        And on checkpoints(long boxes) edit the question=0 part to determine which question will be displayed from the @@questions array, the count starts at 0.


        race.skp

        1 Reply Last reply Reply Quote 0
        • M Offline
          mptak
          last edited by 1 Jul 2011, 11:56

          Its on "my list" but I don't at present. I am trying to dive into jsquery, ruby, and python simultaneously
          so I can force feed my kids (and students) some basic information like balls fall down, the stock market doesn't
          "always" go up and humpty dumpty was pushed. (Insert your own facts here). I'm trying to take advantage of what they are doing out on http://www.khanacademy.org in terms of designing everything into HTML and jsQuery enhanced pages. Thanks heaps...the multi user/multi file input stuff was really dug by my students....I think I caught them NOT looking at their facebook pages for at least 5 minutes(:))

          1 Reply Last reply Reply Quote 0
          • M Offline
            mptak
            last edited by 1 Jul 2011, 12:02

            Works like a charm! As always I am enthusiastically grateful!

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

            Advertisement