Posted 01 April 2013 - 05:11 PM
i am what a code for a basic 5 blocks up and 5 blocks down lift please by using touch screen
i am what a code for a basic 5 blocks up and 5 blocks down lift please by using touch screen
uhm… maybe this can help:i am what a code for a basic 5 blocks up and 5 blocks down lift please by using touch screen
local sUp = "top"
local sDn = "bottom"
os.loadAPI("button") //I am using DW20's button API used in SMP Season 4
function up()
rs.setOutput(sUp, true)
sleep(.1)
rs.setOutput(sUp, false)
end
function down()
rs.setOutput(sDn, true)
sleep(.1)
rs.setOutput(sDn, false)
end
button.setTable("Up", main.up, xmin, xmax, ymin, ymax)
button.setTable("Down", main.down, xmin, xmax, ymin, ymax)
while true do
button.screen()
local e,side,x,y = os.pullEvent("monitor_touch")
button.checkxy(x,y)
sleep(.1)
end