2 posts
                
             
            
                Posted 24 February 2014 - 12:35 PM
                Here's the dilemma that I'm in. I got and edited some code for a door on the internet, that uses a monitor button system. Only issue I have, is that a player has to manually toggle the button again, If anyone could help, I would be much appreciated. Here's the pastebin with the code: 
http://pastebin.com/51HYV1Xs 
                
             
         
        
        
            
            
                
                    
                
                56 posts
                
             
            
                Posted 24 February 2014 - 05:27 PM
                I'm not sure if this will work because I can't test it but if you add in an os.reboot() after the gettouch(or whatever function it is) should solve the problem.  Name the program startup of course.  That's probably the easiest way I can think of to do it
                
                    Edited on 24 February 2014 - 04:28 PM
                
             
         
        
        
            
            
                
                    
                
                7083 posts
                
                    
                        Location
                        Tasmania (AU)
                    
                
             
            
                Posted 24 February 2014 - 06:03 PM
                Around line 158, we have:
      print("Touch on button: "..name)
      toggleBundledOutput(name)
      break
So to make it automatically toggle back after a few seconds, do:
      print("Touch on button: "..name)
      toggleBundledOutput(name)
      sleep(3)
      toggleBundledOutput(name)
      break
 
                
             
         
        
        
            
            
                
                    
                
                56 posts
                
             
            
                Posted 24 February 2014 - 09:31 PM
                I thought you meant te program had to be reset, not the door. Then in that case,  do what bomb bloke said but instead of toggling a second color you have to toggle the number 0. You also need a side as an argument with the bundled outputs.
                
             
         
        
        
            
            
                
                    
                
                2 posts
                
             
            
                Posted 24 February 2014 - 09:58 PM
                Around line 158, we have:
	  print("Touch on button: "..name)
	  toggleBundledOutput(name)
	  break
So to make it automatically toggle back after a few seconds, do:
	  print("Touch on button: "..name)
	  toggleBundledOutput(name)
	  sleep(3)
	  toggleBundledOutput(name)
	  break
Worked for me, thanks :D/>