playMaker

Author Topic: Need some advice on finding closest object within an objects line of sight  (Read 1505 times)

damiensfear

  • Playmaker Newbie
  • *
  • Posts: 5
Hi All
Im currently working on an RTS type game and have hit a bit of a wall with my AI and was wondering of anyone could possibly give me some advice.
What I need to do is have a character find the closest enemy within its field of view. The thing I am having trouble with is I have 5 player characters that need to do this and an as yet unknown amount of enemies.
I need a way of disregarding any enemies that are not within Field of view and then find the closest from the remaining enemies
Im sorry but I cant really think of how to put this into words any better lol.
If anyone could offer any advice it would be muchly appreciated
Thanks in advance
Callum

adrian

  • Junior Playmaker
  • **
  • Posts: 52
is this series of videos any help: