Isolating Combat NPC's AI From Each Other?

Isolating Combat NPC's AI From Each Other?

Re: Isolating Combat NPC's AI From Each Other? Posted by Aavenr on Mon Jan 2nd 2006 at 11:00am
Aavenr
2 posts
Posted 2006-01-02 11:00am
Aavenr
member
2 posts 0 snarkmarks Registered: Jan 2nd 2006
Hey guys,<br style="font-family: Verdana; color: white;">
<br style="font-family: Verdana; color: white;">
I have got this big outdoors section on my level taking place inside
what is essentially a big basin with a building structure on the
center. There are enemies lining up the rock walls of the basin and
along bridges that connect it to the main building. The idea is to make
this a stealth level of sorts where you can take out each enemy one by
one from afar or from point-blank range. <br style="font-family: Verdana; color: white;">
<br style="font-family: Verdana; color: white;">
I have tried to sort of isolate each enemy from each and from the
player by not giving them a common squad name, and having them turn
their backs to the player. However, the problem I am encountering is
that whenever the player kills a given enemy or is spotted by one of
them and that enemy starts firing back, the rest of them -- which are
pretty far away on other bridges, rocks, etc -- hear it, immediately
turn towards the player and next thing you know, there is a dozen
enemies shooting at the player all at the same time.<br style="font-family: Verdana; color: white;">
<br style="font-family: Verdana; color: white;">
So what I want to do is to sort of isolate them into their own world if
you will. I can control their visual perception by tweaking their
orientation towards the world but I haven't been able to block them
from each other.<br style="font-family: Verdana; color: white;">
<br style="font-family: Verdana; color: white;">
I also want any them to be available at all times for the player to
shoot at, and that they can also respond accordingly. So it's not like
I can just put them in a dormant state until a player-activated trigger
wakes them up. <br style="font-family: Verdana; color: white;">
<br style="font-family: Verdana; color: white;">
I have been researching and testing all day to find a workable solution
to this scenario but to no avail. So my question is, do you know if
there is any way -- without actually having to go dirty and actually
programming a custom NPC -- of shutting off their hearing sense, or
blocking them from any action until they have been directly damaged?<br style="font-family: Verdana; color: white;">
<br style="font-family: Verdana; color: white;">
Any help would be greatly appreciated. User posted image
Re: Isolating Combat NPC's AI From Each Other? Posted by SmokersCough on Mon Jan 2nd 2006 at 6:04pm
SmokersCough
28 posts
Posted 2006-01-02 6:04pm
28 posts 13 snarkmarks Registered: Dec 20th 2005
I'm not sure how you are going about this but try giving each enemy a different ai_relationship, now once one enemy is killed trigger the ai relationship to change from like to hate, this will mean they will not respond to their buddies death until the ai relationship changes (i think) also try using the block line of sight texture near each enemy so they can't see the next enemy, you can always kill the brush and it's parneting upon the previous enemy dying, hope this makes sense.
Re: Isolating Combat NPC's AI From Each Other? Posted by omegaslayer on Mon Jan 2nd 2006 at 10:25pm
omegaslayer
2481 posts
Posted 2006-01-02 10:25pm
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
Just a little tewwking from what Smoke said:

Make an ai_relationship, make it so all the soldiers are friendly with
the !player. This way when they are killed they wont fire at you. But
to make them start firing at you, have each soldier have an output of
OnFoundPlayer (reverts the ai_relationship to hate).
Posting And You
Re: Isolating Combat NPC's AI From Each Other? Posted by Aavenr on Tue Jan 3rd 2006 at 3:33am
Aavenr
2 posts
Posted 2006-01-03 3:33am
Aavenr
member
2 posts 0 snarkmarks Registered: Jan 2nd 2006
SmokersCough's idea with the ai_relationship was a bit hard to decipher at first, but omegaslayer's makes perfect sense. Very clever, and you know what? It worked like a charm!

Thank you so much gentlemen. :wink:
Re: Isolating Combat NPC's AI From Each Other? Posted by omegaslayer on Wed Jan 4th 2006 at 7:22pm
omegaslayer
2481 posts
Posted 2006-01-04 7:22pm
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
Another problem solved :smile:
Posting And You