Posted 24 March 2012 - 03:04 PM
i need help with a script that will send a redstone signal until a displayed on screen counter is done counting to 100. i've tried using a for loop but cant get it down right. someone please help?
side = "back" --redstone side
rs.setOutput(side,true) --turn redstone on
for i=1, 100 do
--write i to the screen
term.setCursorPos(1,1)
print(i)
sleep(0.1)
end
rs.setOutput(side,false) -- turn redstone back off
side = "back" --redstone side
delay = 5 --The time it will take to count from 1 to 100
delay = delay/100
rs.setOutput(side,true) --turn redstone on
for i=1, 100 do
--write i to the screen
term.setCursorPos(1,1)
print(i)
sleep(delay)
end
rs.setOutput(side,false) -- turn redstone back off