Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] No problem
#3
This.me contains the bot objet. So this.me.team returns the same thing as "this.team" in an "object::" function.
I had problems with this always returning the first robot in "object::" functions, so I only use classes now.

Should it work if ask for "FilterFriendly | MyTeamId" or should I remove the "FilterFriendly" in codebattle (and use it only if My team id is 0) ? In that case, FilterFriendly should be named "FilterBots" or "FilterNoAnts" :p

So it will be the same for "FilterEnemy" : it will not return bots, only ants, am I right ?

So I shoud write something like
Code:
int getFriendlyFilter(){
 if(this.me.team==0)
   return FilterFriendly;
 else return this.me.team;
}
bool checkTitanium(){
       object[] converters = radarall ( Converter, 0, 360, 0, 500, getFriendlyFilter() );
       if(sizeof(converters)==0){return true;}
       for (int i = 0; i < sizeof(converters); ++i)
       {
           object conv = converters[i];
           bool bu = conv.busy();
           if(bu==true){
               continue;
           }

IMHO "busy" should also be available for strategic purpose.


Thank you for your priceless help !!

here is "your reward" :p : https://www.dropbox.com/sh/mpups9y5f00ek...ficial.mp3
Love from la France


Messages In This Thread
[solved] No problem - by nknk - 12-22-2016, 01:15 AM
RE: A problem ? (maybe) with busy ft ? - by nknk - 12-22-2016, 12:44 PM
RE: A problem ? (maybe) with busy ft ? - by nknk - 12-22-2016, 01:47 PM
RE: [solved] No problem - by nknk - 12-22-2016, 02:14 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)