This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
DrElyk's profile picture

Easy way to get player coordinates?

Started by DrElyk, 18 December 2015 - 07:46 PM
DrElyk #1
Posted 18 December 2015 - 08:46 PM
I'm playing on a PvP server with some friends and it would be awesome if I could write a program that either finds the coordinates for logged on players, or at least detects nearby players. I have some experience with C but I don't really know where to start with this so any help is appreciated.
Lupus590 #2
Posted 18 December 2015 - 09:30 PM
Computercraft can't (on it's own) get player location (unless said player has a pocket computer, but then they need to be telling you their location).

You will need an addon for computercraft, I'm sure that some others will know which mods.

As for learning lua, look at the wiki and the tutorial section of the forums.
Edited on 18 December 2015 - 08:31 PM
Bomb Bloke #3
Posted 19 December 2015 - 07:24 AM
Computercraft can't (on it's own) get player location (unless said player has a pocket computer, but then they need to be telling you their location).

Well, a Command Computer can, though you won't be using one of those without OP rights.
Creator #4
Posted 19 December 2015 - 11:19 AM
If you want the position of a PC use the GPS api.
martmists #5
Posted 19 December 2015 - 11:54 AM
If you dont mind using a mod, I recommend the sensor from openperipheral-addons. it is not updated for CC-1.76prX yet.
as of CC alone, I have not found any way to do this.