I am looking for a clock(for in game time) that can activate redstone at night and turn it off in the day.
because I can not figure out the coding for it.
edit: i figured out the code
crazyguymgd, on 13 January 2013 - 09:19 PM, said:
time = os.time() if time < 6 or time > 18 then -- redstone output that says it's night endwould tell you if it's night. then you just run that when you want to know if it's night...
while true do
time = os.time()
if time < 6 or time > 18 then
rs.setOutput("back",true)-- redstone output that says it's night
end
sleep(0.1)
end
thanks for your help crazyguymgd











