The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.15 (Linux)
File Line Function
/showthread.php 906 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checking used objects. (ore that was moved)
#1
I am working on the code for a bot, that will be automatically drag a titanium ore to a specific destination (for instance flag, or even better just destination (z,x,y)), find a free space, and go to the next chunk.
And repeat this till the end of times Big Grin.

But i got a problem. Is there any way to check, was this specific piece of rock was already taken by my bot, or not?
I think there is a way - i have to make an Array and add every ore that was moved, and after that check the whole array, before choosing a next target.

But there is some flaws. Let's imagine making check by destination (z,x,y), if ore was moved by me(or another bot) bot would be think that it's a new piece of ore.
if use checking by reference to an object (a piece of ore) to it could to error if this or is consumed (to make a new bot for instance).
How do you advise me to make a program, without using radar function, and playing with its angle parameter.
Main idea for this bot - to only once touching one piece if ore and forever forget about of it.


And last but not least - is there any way to save this information. Just imagine there is some kind of glitch and i have to restart bot's funtion.
And it will completely incredible if there is a way to share this information beetwen different bots. For instance i have 2 bot's that collect ore at the same time


P.S.
Is it possible to make a bot to build something in company mode?


Messages In This Thread
Checking used objects. (ore that was moved) - by clop1000 - 07-02-2016, 01:24 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)