Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- local inputTable = {[16] = 0, [17] = 2, [18] = 1, [30] = 4, [31] = 3, [32] = 5}
- function movement()
- term.setCursorPos(1,1)
- print("WASD to control, Q = down, E = up")
- while true do
- local sEvent, par = os.pullEvent("key")
- for k, v in pairs(inputTable) do
- if(sEvent == "key") then
- drive.move(inputTable[par], true, false)
- end
- end
- end
- end
- movement()
Add Comment
Please, Sign In to add comment