177 posts
Location
Spain
Posted 20 February 2015 - 03:52 PM
I looked up into Command API and I saw commands.getBlockPosition()
My little idea is editing GPS program to make anything like this
...
if arg[1] == "host" and #arg == 1 then
if command then
local x,y,z = commands.getBlockPosition()
host(x,y,z)
end
end
...
That would be cool: You can make a computer with startup code "shell.run("gps host")" an copy (mid-click in GM 1) the computer, place in anywhere you want and easily host multiple GPS pos.
Tip for people if Dan deny it:Edit startup and place this code:
local x,y,z = commands.getBlockPosition()
shell.run("gps","host",x,y,z)
957 posts
Location
Web Development
Posted 20 February 2015 - 06:45 PM
Tip for people if Dan deny it:Edit startup and place this code:
local x,y,z = commands.getBlockPosition()
shell.run("gps","host",x,y,z)
Why not just do this anyway?
1029 posts
Location
Missouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension
Posted 21 February 2015 - 12:41 AM
He wants it default.
/support
Edited on 20 February 2015 - 11:41 PM
1140 posts
Location
Kaunas, Lithuania
Posted 21 February 2015 - 11:46 AM
But when you think about it, to make it automatic you'll probably add a startup script anyways. So an extra line of code won't make too much of a difference here.
7083 posts
Location
Tasmania (AU)
Posted 21 February 2015 - 12:44 PM
I wouldn't even use two lines.
shell.run("gps host", commands.getBlockPosition())
524 posts
Location
Cambridge, England
Posted 23 February 2015 - 03:48 PM
Good idea. On Command Computers, gps.locate() now delegates to commands.getBlockPosition() if it's available.
2679 posts
Location
You will never find me, muhahahahahaha
Posted 18 March 2015 - 11:13 PM
Good idea. On Command Computers, gps.locate() now delegates to commands.getBlockPosition() if it's available.
Yep, but the user may have his own coordinate system, which then would totally ruin the custom coordinates, because
commands.getBlockPosition() uses the default ones.
7083 posts
Location
Tasmania (AU)
Posted 19 March 2015 - 09:46 AM
Then the user can translate that themselves. That's not a problem.