Its really anoying. Help appreciated. Thanks
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
repeat
Started by pofferman, 20 December 2015 - 04:47 PMPosted 20 December 2015 - 05:47 PM
Why doesnt the program "reapeat" support gps.locate() ?
Its really anoying. Help appreciated. Thanks
Its really anoying. Help appreciated. Thanks
Posted 20 December 2015 - 06:08 PM
Why doesnt the program "reapeat" support gps.locate() ?
Its really anoying. Help appreciated. Thanks
The gps API works by bouncing a signal directly off of 3 other computers and receiving their distances from you. That information is then used to triangulate your position in the world. Therefore, I'm guessing gps.locate just uses the wireless modem peripheral directly without going through the rednet protocol. This means that it won't try to have the signal pass through repeaters or even receive data from repeaters. As well, there wouldn't be much point of repeating your gps requests until you find the gps computers, because then the triangulated position would be that of the repeater which ends up sending the signal to the gps computers, and not your own computer.
Posted 20 December 2015 - 09:19 PM
i guess your right :/
tanks tho
tanks tho
Posted 21 December 2015 - 12:25 AM
Remember that if you're using advanced computers, it's fairly easy to have them run both the repeat and gps scripts at the same time. Create a startup script along these lines:
shell.run("bg repeat")
shell.run("gps host <x> <y> <z>")
Posted 21 December 2015 - 12:29 AM
Remember that if you're using advanced computers, it's fairly easy to have them run both the repeat and gps scripts at the same time. Create a startup script along these lines:shell.run("bg repeat") shell.run("gps host <x> <y> <z>")
Can't you also use the parallel API?
Posted 21 December 2015 - 12:42 AM
The display output would be a bit garbled, but for these scripts, I suppose that doesn't matter:
parallel.waitForAny(function() shell.run("repeat") end, function() shell.run("gps host <x> <y> <z>") end)
Posted 21 December 2015 - 06:59 PM
How would this fix the problem? o.O
Posted 21 December 2015 - 07:22 PM
it allows your repeating computers to at as gps hosts
Edited on 21 December 2015 - 06:22 PM