This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Roric101's profile picture

Keycard problem

Started by Roric101, 19 August 2013 - 10:10 PM
Roric101 #1
Posted 20 August 2013 - 12:10 AM
I am brand new to coding and am working on a keycard program for a room in my house, but I want the door to stay open as long as the key is in, and close when I remove it. I'm using a code I found online which spits your keycard out as soon as you put it in, keeping the door open for a limited time. I got my code from this video: https://www.youtube....h?v=KfDDoTh2s2o
Lyqyd #2
Posted 20 August 2013 - 01:17 AM
Split into new topic.

You'll want to look into the disk and disk_eject events to cause things to happen when disks are inserted and removed.