This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
tacticdesignz's profile picture

Basic touchscreen lift

Started by tacticdesignz, 01 April 2013 - 03:11 PM
tacticdesignz #1
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
Kingdaro #2
Posted 01 April 2013 - 05:14 PM
Screenshots of your setup? We can't exactly see what kind of lift you're going for here.
JokerRH #3
Posted 02 April 2013 - 05:09 AM
i am what a code for a basic 5 blocks up and 5 blocks down lift please by using touch screen

–> "I want a code for a basic 5 blocks up and 5 blocks down lift with touch screen input, please"
(I guess that's what that should mean)

Couldn't you even try to code something yourself instead of coming here and asking for someone to do it for you?
If you have an error that you can't solve yourself then post a topic asking for help.
BabyCodder #4
Posted 02 April 2013 - 05:33 AM
How are you actually going to lift youself up?
D3add3d #5
Posted 02 April 2013 - 06:13 AM
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:
Spoiler

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