Jump to content

Mobile mortar bot not going for in-range available AMMOCAB when out of ammo


Recommended Posts

Good evening,

I'm going through the rework of my old Operation Resurrection waypoints

I've added a mobile mortar goal for Axis on start, enabled Mansion cabinets, and specifically increased the range of the ammo one so the mortar goal is within range

Once the bot is out of ammo, it does not go for it

I've modified goal_usecabinet's this.GetPriority function in the following manner (added the else part to force the DestGoals, and check actual range), and the bot goes for it:

if(ammoPriority > healthPriority && ammoPriority > 0.7 && ammo.AmmoType>=0)
{
  if ( this.QueryGoals(Util.QueryTable, 0x52ad0a47 /* AMMOCAB */) )
  {
    this.DestGoals = Util.QueryTable;
    Util.QueryTable = {};
    this.CabinetType = this.CAB_AMMO;
    this.AmmoType = ammo.AmmoType;
    this.AmmoAmount = ammo.GetAmmo;
    this.Priority = ammoPriority;
  }
  else
  {
    tstGoal = GetGoal( "AMMOCAB_main_ammocabinet" );
    Util.MapDebugPrint( "Range from " + this.Bot.Name + Util.DebugColorString + " to " + tstGoal.GetName() + ": " + DistanceBetween( this.Bot.GetGameEntity(), tstGoal ), true );
    this.DestGoals = { tstGoal };
    this.CabinetType = this.CAB_AMMO;
    this.AmmoType = ammo.AmmoType;
    this.AmmoAmount = ammo.GetAmmo;
    this.Priority = ammoPriority;
  }
}

Am I missing something big? ^^"

I don't know where to look at the QueryGoals function (called from C?)

Attached my current waypoints

Map download link: https://wolffiles.de/filebase/ET/Maps/operation_resurrection.zip

Thank you in advance

Operation Resurrection.zip

Link to comment
Share on other sites

  • Moderators

You increased the range of the MORTAR goal. But you have to increase the range of the AMMOCAB goal which is only 1250.

	AMMOCAB_main_ammocabinet = 
	{
		CreateOnLoad = 0,
		GoalType = "AMMOCAB",
		Position = Vec3(1512.000, 939.000, 516.000),
		Range = 1250,
		TeamAvailability = 6,
	},

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...