Tripwire Interactive Forums

Go Back   Tripwire Interactive Forums > Red Orchestra: Ostfront 41-45 Forums > Red Orchestra Modifications > Coding

Reply
 
Thread Tools Display Modes
  #1  
Old 09-13-2007, 10:13 AM
Six_Ten's Avatar
Six_Ten Six_Ten is offline
Senior Member
 
Join Date: Mar 2006
Posts: 1,382
Default Aztec melee: cause bots to attack?

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?
__________________
NEMO ME IMPVNE LACESSIT
Reply With Quote
  #2  
Old 09-13-2007, 04:17 PM
SgtH3nry3's Avatar
SgtH3nry3 SgtH3nry3 is offline
Senior Member
 
Join Date: Nov 2005
Location: Oudenhoorn, The Netherlands
Posts: 2,474
Default

Bump.
Reply With Quote
  #3  
Old 09-13-2007, 06:10 PM
UncleDrax's Avatar
UncleDrax UncleDrax is offline
Senior Member
 
Join Date: Oct 2005
Location: Florida, USA
Posts: 1,474
Default

I'd dig around the existing RO Code and see how it handles the rifle butt attacks..

is your melee dam type inheriting from ROGame.ROWeaponBashDamageType or ROGame.ROWeaponBayonetDamageType ?
__________________
Coming soon to a pint glass: Iron Curtain Strong Ale | IS-2 Ale | Iosif's Proletariat Ale
Reply With Quote
  #4  
Old 09-13-2007, 06:49 PM
Shurek Shurek is offline
On Vacation
 
Join Date: May 2006
Location: www.darkesthourgame.com
Posts: 857
Default

The same "problem" is in vanilla RO. Enemy bots will swarm you and would rather fire off their weapons until dry than try to rifle butt you.
Reply With Quote
  #5  
Old 09-13-2007, 06:53 PM
UncleDrax's Avatar
UncleDrax UncleDrax is offline
Senior Member
 
Join Date: Oct 2005
Location: Florida, USA
Posts: 1,474
Default

I swear I've seen RO bots melee?
__________________
Coming soon to a pint glass: Iron Curtain Strong Ale | IS-2 Ale | Iosif's Proletariat Ale
Reply With Quote
  #6  
Old 09-13-2007, 08:32 PM
Six_Ten's Avatar
Six_Ten Six_Ten is offline
Senior Member
 
Join Date: Mar 2006
Posts: 1,382
Default

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.
__________________
NEMO ME IMPVNE LACESSIT
Reply With Quote
  #7  
Old 09-14-2007, 03:33 AM
Six_Ten's Avatar
Six_Ten Six_Ten is offline
Senior Member
 
Join Date: Mar 2006
Posts: 1,382
Default

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!");
}
__________________
NEMO ME IMPVNE LACESSIT
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:26 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2005 - 2013, Tripwire Interactive, LLC