Jump to content

Welcome to Omni-bot Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

Bots capturing, but not going to base with the flag...

- - - - -

  • Please log in to reply
6 replies to this topic

#1
Vrex

Vrex

    Member

  • Members
  • PipPip
  • 11 posts

Hi all,

 

I added some new snipe / route goals and waypoints to the ctf_face_b1 map work done by =F|A=Buckwild.

 

One thing I've noticed though is that the bots dont ever return to base with the flag once its been picked up.

 

I created maproutes going from the spawn to the flag and back to the base, however, even with goalroutes showing they should be going to the base, they veer off at the last possible waypoint to avoid the goal and then just roam the map carrying the flag till they die.

 

I thought it may have been a priority problem, but disabling the extra goals and locking them to another class doesnt fix it.

 

I noticed a "timedout:" error for the flag goal (Flag_allies_flag and Flag_axis_flag) but I wasnt sure if that was referring to the flag being respawned or the trigger itself. I've never seen a "timedout" error come up in the console before.

 

Is there a trick to making them bring the flag back to base?

 

Thanks in advance!

 



#2
MickyP[MW]

MickyP[MW]

    Senior Member

  • Members
  • 526 posts

The bots need to know where they are going, they need a "goal" in this case a cappoint goal

 

Without this the bots will just wander about the map for ever unless they by chanceend up at the bace.

 

The flag "FLAG_" is auto detected by omnibot but the capture point "CAPPOINT_" needs to me manually created.

 

With this map because there are 2 Cappoints 1 each for Allies/Axis they need to be defined in the script ie

 global OnMapLoad = function()
{
   SetAvailableMapGoals( TEAM.ALLIES, false, "CAPPOINT_axis" );
   SetAvailableMapGoals( TEAM.AXIS, false, "CAPPOINT_allies"" );

};

This code will disable the other teams cappoint assuming they are named "allies" "axis" (case sensitive)

 

 


Posted Image

#3
Vrex

Vrex

    Member

  • Members
  • PipPip
  • 11 posts

The bots need to know where they are going, they need a "goal" in this case a cappoint goal

 

Without this the bots will just wander about the map for ever unless they by chanceend up at the bace.

 

The flag "FLAG_" is auto detected by omnibot but the capture point "CAPPOINT_" needs to me manually created.

 

Yep! That did it. Thanks for that! 

 

I completely forgot about the cappoint and was assuming that with the correct maproute they'd just follow that and the flag would be returned to the base as part of that maproute.

 

While it all works now with the cappoint goal added, I'd like to understand why the bots didnt follow the maproute as defined.

 

In the map (not sure if you're familiar with it) there is a corridor which splits left and right at a facing wall with both sides then linked by a corridor behind the facing wall. The right side also leads to the cappoint/flag point/maproute goal as part of that link. This is mirrored for the other base. The goals are all separated and dont overlap.

 

Without fail, the bots completely avoid going right and never go to the final step in the maproute (ROUTE_allied_home / ROUTE_axis_home). The bots follow the maproute to the letter until that point however. If I remove the added waypoints so the bots are forced to only go to the goal, they reverse direction where they would usually turn left instead of right.

 

I understand they'll wander the map aimlessly without the cappoint, but with a maproute set (FLAG_allies_flag / FLAG_axis_flag) shouldnt the bots follow this to the end before starting to wander aimlessly? This is more like a specific avoiding of the final route goal.

 

Thanks again!



#4
palota

palota

    Senior Member

  • Administrators
  • 516 posts

Who the hell is Buckwild ? Why does he make waypoints only for some secret clan and does not share them with us ?

FLAG goals are used for going from spawns to flags. CAPPOINT goals are used for carrying flags to the base. You have to define routes of both goals. If you don't know how to do it, you can view scripts of other maps (for example radar.gm, ctf_pool_v2.gm, lp2_ctf.gm, ...).



#5
Vrex

Vrex

    Member

  • Members
  • PipPip
  • 11 posts

Who the hell is Buckwild ? Why does he make waypoints only for some secret clan and does not share them with us ?

FLAG goals are used for going from spawns to flags. CAPPOINT goals are used for carrying flags to the base. You have to define routes of both goals. If you don't know how to do it, you can view scripts of other maps (for example radar.gm, ctf_pool_v2.gm, lp2_ctf.gm, ...).

 

Erm, no idea. I have no affiliation with them, I just did a google search one night for an omni-bot script for the map (ctf_face_b1 omni-bot - its the top search result - looks like it was uploaded in 2015) and then decided to modify it to add / fix functionality after seeing what was scripted.

 

I'm not sure what I've said that deserves the curt reply?

 

I understand the need to define a maproute for the cappoint goal, but I'm querying what was happening without the cappoint goal / maproute added. Do the bots automatically ignore the remaining parts of a defined Flag maproute once the flag has been picked up and swap to the cappoint goal maproute?

 

As I said in my initial post, the bots appeared to follow the Flag maproute (spawn -> flag -> return to base) all the way up until a waypoint just before the "return to base" route goal I created and then veer off to wander rather than random wandering from when the flag is picked up and (at that point in time) having no cappoint maproute to follow.

 

I'm just trying to understand the bots behaviour so I can script / troubleshoot them more effectively.



#6
palota

palota

    Senior Member

  • Administrators
  • 516 posts

All my replies are always curt and extremely short because I type very slowly and my English is bad. Sorry.

If a flag is picked up and cappoint goal does not exist, then bot goes to lower priority goals (usually attack or defend). Because there are no other goals on ctf_face_b1 map, bot was randomly roaming.

If you switch to spectator, you can see bot's active goal by command /bot debugbot all fpinfo

 



#7
Vrex

Vrex

    Member

  • Members
  • PipPip
  • 11 posts

All my replies are always curt and extremely short because I type very slowly and my English is bad. Sorry.

If a flag is picked up and cappoint goal does not exist, then bot goes to lower priority goals (usually attack or defend). Because there are no other goals on ctf_face_b1 map, bot was randomly roaming.

If you switch to spectator, you can see bot's active goal by command /bot debugbot all fpinfo

 

No problem, I was more worried I'd caused offence somehow asking about a clan map.

 

I understand now why the bot took the path it did, and why it would be the same each time... The bot was just going back to the other side of the map where the new snipe goals were. That path would be the same each time up until the left / right split corridor where the snipe goals are accessed from.

 

Thanks again!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users