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

    On Tick?

    Scheduled Pinned Locked Moved SketchyPhysics
    3 Posts 3 Posters 483 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.
    • K Offline
      klaufi
      last edited by

      hi
      what are ontick and similar commands? where can i find them and how are they used?

      edit:
      OK, i found out that i missed the latest version -.-
      but still: how are they used? what can you do with them? how do i turn a var back when the body isnt touched anymore?

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

        ontick executes your command every frame of the simulation. if you put in playsound('shot.wav'), it would play the sound every frame. and setting variables to something else when an entity is not touched is not really possible with just script, unless you want a highly unstable method of setting it back. if you really want to use this code, put this in ontouch: setVar('name',1) and in ontick: setVar('name',0). hope this helps!

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

          ... But make sure to set the onTick framerate to 2 😉

          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