Posted 09 September 2016 - 04:01 AM
hey, I am somewhat new to computercraft, and i was wondering if it is at all possible to make a program repeat a lua command over and over a specific amount of times
im stupid, lol
heres my code that looks probably very messy…
any ways of simplifying this?
im stupid, lol
heres my code that looks probably very messy…
while true do
rs.setOutput("top",true)
sleep(0.2)
rs.setOutput("top,false)
rs.setOutput("top",true)
sleep(0.2)
rs.setOutput("top,false)
rs.setOutput("top",true)
sleep(0.2)
rs.setOutput("top,false)
rs.setOutput("top",true)
sleep(0.2)
rs.setOutput("top,false)
rs.setOutput("top",true)
sleep(0.2)
rs.setOutput("top,false)
rs.setOutput("top",true)
sleep(0.2)
rs.setOutput("top,false)
rs.setOutput("left",true)
sleep(0.2)
rs.setOutput("left",false)
rs.setOutput("left",true)
sleep(0.2)
rs.setOutput("left",false)
rs.setOutput("right",true)
sleep(0.2)
rs.setOutput("right",false)
rs.setOutput("right",true)
sleep(0.2)
rs.setOutput("right",false)
rs.setOutput("right",true)
sleep(0.2)
rs.setOutput("right",false)
rs.setOutput("right",true)
sleep(0.2)
rs.setOutput("right",false)
rs.setOutput("right",true)
sleep(0.2)
rs.setOutput("right",false)
end
any ways of simplifying this?