Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local oldx,oldy,oldz = shell.run(GetPos())
- shell.run(GoForward(1))
- shell.run(GetPos())
- print("check direction")
- if cx > oldx then
- currentFacing = 3
- return 3
- elseif cx < oldx then
- currentFacing = 1
- return 1
- elseif cy > oldy then
- currentFacing = 0
- return 0
- else
- currentFacing = 2
- return 2
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement