Been working on a computercraft project recently and I need to be able to pull player coordinates and store them. I tried setting up a rednet connection to a pocket computer that would return its coordinates when prompted, but even when it locates it doesnt save the coordinates. Any idea on how I could store those values to variables in the pocket computer? I already know how to send them back.
2
3 replies to this topic
#1
Posted 05 February 2017 - 05:17 AM
#3
Posted 05 February 2017 - 02:15 PM
Dog, on 05 February 2017 - 06:35 AM, said:
You need to capture the values in variables, like so...
You can find more information here.
local x, y, z = gps.locate()
You can find more information here.
I understand this. I set up a gps host, and the gps program worked, but when I did
local x, y, z = gps.locate()And then try something like
print(x)It just prints out a blank space with a one on the next line.
EDIT: just did a bit more reading and it appears that I need multiple computers running gps host
Edited by gearpenguin, 05 February 2017 - 02:19 PM.
#4
Posted 05 February 2017 - 05:57 PM
Yes - you need at least 4 computers (2 each at different altitudes). If you want an 'easy' way to build a GPS cluster for your world you could try Lyqyd's Project Builder or GPS-Deploy. Please note the link to GPS-Deploy is shameless self-promotion (it links to the version I just released). If you'd prefer to use the original version of GPS-Deploy, go here.
Edited by Dog, 05 February 2017 - 06:16 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users