Created
March 8, 2014 15:25
-
-
Save tterrag1098/9433253 to your computer and use it in GitHub Desktop.
Smeltery code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local pulses = 0 | |
local ticksSinceLast = 0 | |
while true do | |
if redstone.getInput("left") == true then | |
pulses = pulses + 1 --stack up pulses | |
end | |
if ticksSinceLast >= 200 and pulses > 0 then --10 seconds | |
redstone.setOutput("right", true) | |
ticksSinceLast = 0 --reset ticks | |
pulses = pulses - 1 --decrement pulses | |
else | |
redstone.setOutput("right", false) | |
ticksSinceLast = ticksSinceLast + 1 --increment ticks | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment