Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Tracked Turtle
- local pos = {x=0, y=0, z=0}
- local dir = 0
- local directions = {
- [1]={
- name="north",
- vector={x=0, y=0, z=1}
- },
- [2]={
- name="east",
- vector={x=1, y=0, z=0}
- },
- [3]={
- name="south",
- vector={x=0, y=0, z=-1}
- },
- [4]={
- name="west",
- vector={x=-1, y=0, z=0}
- },
- }
- local function getDirVector(dir)
- return directions[dir].vector
- end
- print("North", getDirVector(1))
- print("East", getDirVector(2))
- print("South", getDirVector(3))
- print("West", getDirVector(4))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement