Advertisement
TangentDelta

Input

Dec 27th, 2011
3,085
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. --Title: RedstoneInput
  2. --Version: 1
  3. --Last Revised: N/A
  4. --Last Revised By: N/A
  5. --Author: TangentDelta (alias Hydrogen)
  6. --Platform: ComputerCraft LUA Virtual Machine
  7. --Notes: It's going to be part of my PLC program
  8.  
  9. local function scan(side, var)
  10.  if redstone.getInput(side) then
  11.   var = true
  12.   print (side)
  13.    else
  14.   var = false
  15.  end
  16. end
  17.  
  18. scan("left", l)
  19. scan("front", f)
  20. scan("right", r)
  21. scan("back", b)
  22. scan("bottom", bo)
  23. scan("top", t) --lol, I have no idea if this one even works
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement