View Single Post
Old 05-25-2008, 02:53 PM   #6
DeeperThought

DeeperThought's Avatar
Re: Best way to do friendly AIs?
Quote:
Originally Posted by Jblade View Post
Well that definitly helps, thanks I'll get it working first before concerning myself with things like height differences and wherether things are blocking it (although really the AI would mostly be used in sparse maps so this won't be too much of a problem)
That code that I posted doesn't really help with the wall problem very much, because if it finds an enemy behind a wall the first time, it's just going to keep finding it. The main use of that routine is that it makes targets close by higher priority than targets further away, because closer targets are found first. That feature does help with the wall problem somewhat, because typically a monster behind a wall is a bit further away than other monsters in the area.

Another thing that I do which does tend to help is, when a bot gets shot, it checks out who shot him and makes it his target if it is an enemy and he can see it. So if he is obsessing about a monster behind a wall, getting shot by another monster will snap him out of it.
__________________
DUKE PLUS
New map effects and various optional extras for Duke 3D.

DUKE NUKEM: ATTRITION
XP based weapon upgrades, progressive difficulty, and more.
Last edited by DeeperThought; 05-25-2008 at 02:56 PM.
DeeperThought is offline