Advertisement
WhiteFire_Sondergaar

Pulsing

Jun 2nd, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. -- Pulsing
  2. -- by Fenthis
  3.  
  4. sides = { "left", "right", "top"}
  5. speed = 1.0
  6.  
  7. print("Pulsing the ", table.concat(sides, ", "), " sides.")
  8.  
  9. local function setSides(val)
  10.     for i = 1, #sides do
  11.         redstone.setOutput(sides[i], val)
  12.     end
  13. end
  14.  
  15. while true do
  16.     setSides(true)
  17.     sleep(0.1)
  18.     setSides(false)
  19.     sleep(speed - 0.1)
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement