3 posts
Posted 20 January 2013 - 04:09 PM
hi all
i need help making a program that will do a redstone pulse x many time and that x= the amount you type in on the computer
7508 posts
Location
Australia
Posted 20 January 2013 - 04:20 PM
local times = tonumber(read())
for i = 1, times do
rs.setOutput( "bottom", true ) -- replacing bottom with the side to output
sleep(0.1)
rs.setOutput( "bottom", false ) -- replacing bottom with the side to output
end
3 posts
Posted 20 January 2013 - 04:29 PM
i tried it out but it's not pulsing the amount i typed in
7508 posts
Location
Australia
Posted 20 January 2013 - 04:30 PM
Oh oops I missed a sleep…that would always stay on… try this…
local times = tonumber(read())
for i = 1, times do
rs.setOutput( "bottom", true ) -- replacing bottom with the side to output
sleep(0.1)
rs.setOutput( "bottom", false ) -- replacing bottom with the side to output
sleep(0.4)
end
3 posts
Posted 20 January 2013 - 04:31 PM
its now work
thx for the help!!!