![]() |
![]() |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
Bump.
|
|
#3
|
||||
|
||||
|
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 |
|
#4
|
|||
|
|||
|
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.
|
|
#5
|
||||
|
||||
|
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 |
|
#6
|
||||
|
||||
|
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 |
|
#7
|
||||
|
||||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|