sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    On/Off switch

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    3 Posts 3 Posters 1.0k 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.
    • Y Offline
      Yawa
      last edited by

      Hello, I'm from Norway and my English writing is not so good, but I'll try.

      I'm trying to use the "onClick" function to turn the light On/Off. Animating the light-group it self is no problem.
      But I want to use the switch i have created, on the wall, to activate the light. Can someone help me out here?

      1 Reply Last reply Reply Quote 0
      • R Offline
        remus
        last edited by

        If you make a component with the switch on the wall and the lightbulb, then add an onclick function to the switch which turns the light on/off.

        Unfortunately its quite hard/impossible to make 2 separate DCs talk to each other.

        http://remusrendering.wordpress.com/

        1 Reply Last reply Reply Quote 0
        • M Offline
          markozeta
          last edited by

          The components can talk to each other - but it's a bit different. Click on the block with a hole in this example with the interact tool to see how I made it work.

          Set the onclick attribute of the switch to the following:

          Animate("Switch_RotZ", angle1, angle2); Animate("Light!Material", Material1, Material2).

          Doing this will work, even if the light is not in the component with the switch. The problem becomes importing and adding extra copies, but it is doable.

          Mark


          It's the game of telephone! Except this time the message isn't a bad name about the teacher...

          BSME - Cal Poly Pomona
          Sketchup Pipe Maniac

          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