Aztec melee: cause bots to attack?

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

Six_Ten

FNG / Fresh Meat
Mar 12, 2006
1,382
400
0
aztecmod.darkesthourgame.com
I've given my Aztec bots some spears. I can kill bots with them, but the bots don't attack with them. The bots are agressive and surround me, but dont use the melee attack. They do fire darts and arrows, its just the stab or bash attacking they dont use.

Where in the code can I cause the bots to use melee attacks as agressively as they fire rifles and arrows?
 

Six_Ten

FNG / Fresh Meat
Mar 12, 2006
1,382
400
0
aztecmod.darkesthourgame.com
Once or twice in games I've been clubbed by a bot, but it's rare. I want to make it their only weapon, but it will be really one sided if they cannot atack too.

As for code, I had both stab and bash set up, but removed the bayo stuff to jsut see if I could get the bash code working.
 

Six_Ten

FNG / Fresh Meat
Mar 12, 2006
1,382
400
0
aztecmod.darkesthourgame.com
Found this in ROEngine.ROBot
Im also going to look at adding a weapontype WT...

Begin:
bHasFired = false;
if ( (Pawn.Weapon != None) && Pawn.Weapon.bMeleeWeapon )
SwitchToBestWeapon();
GoalString = GoalString@"Ranged attack";
Focus = Target;
Sleep(0.0);
if ( Target == None )
WhatToDoNext(335);
if ( Enemy != None )
CheckIfShouldCrouch(Pawn.Location,Enemy.Location, 1);
if ( NeedToTurn(Target.Location) )
{
Focus = Target;
FinishRotation();
}
bHasFired = true;
if ( Target == Enemy )
TimedFireWeaponAtEnemy();
else
FireWeaponAt(Target);
Sleep(0.1);
if ( ((Pawn.Weapon != None) && Pawn.Weapon.bMeleeWeapon) || (Target == None) || ((Target != Enemy) && (GameObjective(Target) == None) && (Enemy != None) && EnemyVisible()) )
WhatToDoNext(35);
if ( Enemy != None )
CheckIfShouldCrouch(Pawn.Location,Enemy.Location, 1);
Focus = Target;
Sleep(FMax(Pawn.RangedAttackTime(),0.2 + (0.5 + 0.5 * FRand()) * 0.4 * (7 - Skill)));
WhatToDoNext(36);
if ( bSoaking )
SoakStop("STUCK IN RANGEDATTACK!");
}