Skip to content

Instantly share code, notes, and snippets.

@tterrag1098
Created March 8, 2014 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tterrag1098/9433253 to your computer and use it in GitHub Desktop.
Save tterrag1098/9433253 to your computer and use it in GitHub Desktop.
Smeltery code
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