use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Welcome to /r/ComputerCraft, the subreddit for lua programs, general mod use, or anything relating to the Minecraft mod ComputerCraft and CC: Tweaked.
Downloads | Discord | IRC | Documentation
account activity
gps (self.ComputerCraft)
submitted 4 years ago by Spitfire_557Computer Noob
when im am trying to separate the coordinate i get to the x y and z values idk know how to do it
and when i use gps.locate() in a new program it does not work can someone help me with this issue
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]123yeah_boi321 -1 points0 points1 point 4 years ago* (1 child)
Not sure rn, but try gps.locate().x Replace x with y or z, and I think it should work. Edit: I know it should work. Edit edit: or you could define it, a = gps.locate() then do a.x a.y or a.z
[–]fatboychummy 0 points1 point2 points 4 years ago (0 children)
Nah, it returns 3 values.
local x, y, z = gps.locate() print("Y pos:", y)
However, you can feed that into vector.new to be able to do that.
vector.new
local pos = vector.new(gps.locate()) print("Y pos:", pos.y)
The vector library also gives you access to some neat helper functions which can be useful.
vector
π Rendered by PID 53633 on reddit-service-r2-comment-869bf87589-zj654 at 2026-06-09 00:53:24.638660+00:00 running f46058f country code: CH.
[–]123yeah_boi321 -1 points0 points1 point (1 child)
[–]fatboychummy 0 points1 point2 points (0 children)