View difference between Paste ID: Qa01vZtf and KWSxR3c1
SHOW: | | - or go back to the newest paste.
1
term.clear()
2
3
local inputTable = {[16] = 0, [17] = 2, [18] = 1, [30] = 4, [31] = 3, [32] = 5}
4
5
function movement()
6
 term.setCursorPos(1,1)
7
 print("WASD to control, Q = down, E = up")
8
 while true do
9
  local sEvent, par = os.pullEvent("key")
10
   for k, v in pairs(inputTable) do
11
   if(sEvent == "key") then
12
    drive.move(inputTable[par], true, false)
13
   end
14
  end
15
 end
16
end
17
18
movement()