Help with AI

Post » Mon Nov 08, 2010 11:43 pm

Hi, I was wandering if anyone could offer me some help with AI. I am making a mod where a bunch of soldiers raid a town, and I want them to, after stage 70 of the quest that goes along with the battle is set, start attacking people. I want them to go to the ends of the earth to find NPCs to kill, even through load doors and out the city gate to the stables nearby. My question is, how would I achieve this? I tried giving each of the attacking soldiers a Find Package in the CS that told them to find NPCs (I placed the number of NPCs at 0, thinking this would tell them to find as many as they could, not just a certain number) within a 9000 unit radius of their current location. This worked fine, except that the soldiers would NOT go through load doors to find their targets, and most of the time would just cluster around in one spot talking to each other, because they found each other and not the enemy. That leads me to another question. How do I get the Find Package to distinguish the NPCs that it is telling the soldiers to find from friend and foe. I tried making a run-on-target GetInFaction condition that said GetInFaction "AttackingSoldiers" == 0", thinking that it would exclude all the NPCs who were in the AttackingSoldiers faction. But instead, when stage 70 was set, the soldiers didn't even use the package at all. If anyone knows a solution, please tell me.

Thanks,
Agnarond
User avatar
Justin
 
Posts: 3409
Joined: Sun Sep 23, 2007 12:32 am

Post » Tue Nov 09, 2010 1:50 am

just a thought:

make their aggression 90.

then just give them an AI package to go from point A to point B with check box for opening /unlocking doors.

As they do this they should attack anyone they meet along the way who is not in their faction....
User avatar
Karine laverre
 
Posts: 3439
Joined: Tue Mar 20, 2007 7:50 am

Post » Tue Nov 09, 2010 3:25 am

just a thought:

make their aggression 90.

then just give them an AI package to go from point A to point B with check box for opening /unlocking doors.

As they do this they should attack anyone they meet along the way who is not in their faction....


Yes, that should work.
Try this script:

Begin GameModeif GetStage [Quest ID] == 70[Soldier ID].SetActorValue Aggression 90;Sets the soldiers to attack anyone that isn't in the same faction as themEndifEnd


You may need to alter this script to get it to work.

You should try adding a package to the soldiers that tell them to go into a building and search around.
Set the conditions to GetStage == 70

See what that does.
User avatar
Kortniie Dumont
 
Posts: 3428
Joined: Wed Jan 10, 2007 7:50 pm

Post » Tue Nov 09, 2010 3:53 am

Thanks a bunch. It works fine now.
User avatar
SaVino GοΜ
 
Posts: 3360
Joined: Mon Sep 17, 2007 8:00 pm


Return to IV - Oblivion