Making NPCs Fight

Post » Fri Apr 30, 2010 5:49 pm

I have two NPCs who are meant to attack each other on sight. They're set with 100 Aggression, 0 Personality, opposing factions that Love themselves and Hate each other. But they just stand there... If the Player moves into their field of detection, they attack just fine-- and will sometimes turn on each other if the Player leaves, but this really is not convenient since the Player is not meant to be able to get that close to them, or fight them... If anyone has any ideas, I'd be grateful.
User avatar
Tai Scott
 
Posts: 3446
Joined: Sat Jan 20, 2007 6:58 pm

Post » Fri Apr 30, 2010 10:15 pm

I have two NPCs who are meant to attack each other on sight. They're set with 100 Aggression, 0 Personality, opposing factions that Love themselves and Hate each other. But they just stand there... If the Player moves into their field of detection, they attack just fine-- and will sometimes turn on each other if the Player leaves, but this really is not convenient since the Player is not meant to be able to get that close to them, or fight them... If anyone has any ideas, I'd be grateful.


Avoid have PlayerFaction on both of them.
Better dont have them both being members of same faction
Put their faction -100 reaction to enemyfaction
User avatar
kristy dunn
 
Posts: 3410
Joined: Thu Mar 01, 2007 2:08 am

Post » Sat May 01, 2010 2:26 am

I suppose you dont want using scripts here...?
User avatar
Yonah
 
Posts: 3462
Joined: Thu Aug 02, 2007 4:42 am

Post » Sat May 01, 2010 9:58 am

That's really quite odd... Check each of these things are correct:

-Each character is in a separate faction, and each faction has a disposition modifier of -100 to the other.
-Make sure there aren't any AI packages running on the NPCs that have the 'defensive combat' box checked (I'm not sure if this would actually affect it, but I have occasionally have NPCs refuse to fight because this was checked).
-Both NPCs have a confidence of 100
-Both NPCs have a responsibility of 0 (This is probably the one)
-Both NPCs aren't engaged in a wander package that has the 'Must Complete' box checked (Again, this is unlikely to affect it, I'm just covering all my bases).
-I'm not sure if it has an affect on fighting, but bump both the characters' energy level up to 100. If you're only using these specific references for this part of your quest it wont be a problem later.

Hope those help :foodndrink:
User avatar
Gemma Flanagan
 
Posts: 3432
Joined: Sun Aug 13, 2006 6:34 pm

Post » Fri Apr 30, 2010 11:30 pm

Dey,
I'd prefer to avoid scripts, since eventually there will be random possible NPCs

Syhrus,
-Each character is in a separate faction, and each faction has a disposition modifier of -100 to the other.
Already Done :)

-Make sure there aren't any AI packages running on the NPCs that have the 'defensive combat' box checked (I'm not sure if this would actually affect it, but I have occasionally have NPCs refuse to fight because this was checked).
Tried with no AI packages at all and hit the same issue :(

-Both NPCs have a confidence of 100
Already Done :)

-Both NPCs have a responsibility of 0 (This is probably the one)
I *bleieve* it is done, but will check :)

-Both NPCs aren't engaged in a wander package that has the 'Must Complete' box checked (Again, this is unlikely to affect it, I'm just covering all my bases).
Shouldn't be, but I'll check :)

-I'm not sure if it has an affect on fighting, but bump both the characters' energy level up to 100. If you're only using these specific references for this part of your quest it wont be a problem later.
Already done :)

As you can see, I already have all the logical basis covered, so it's really odd why they will not fight... I have found if they are RIGHT ON TOP of each other, they initiate, but not anywhere before... :(
User avatar
gary lee
 
Posts: 3436
Joined: Tue Jul 03, 2007 7:49 pm

Post » Sat May 01, 2010 8:00 am

As you can see, I already have all the logical basis covered, so it's really odd why they will not fight... I have found if they are RIGHT ON TOP of each other, they initiate, but not anywhere before... :(


Now that does sound familiar... I once had two NPCs locked in a UseItemAt package, and wouldn't stop to continue with their other scripts. Oddly enough, the way to fix them was to put them right in front of each other. I never did work out what that was about.

One other thing that popped into my mind last night was that maybe you accidentally left a script on the base models (Presuming you're lazy like me and just copy existing NPCs for every new one you make), which forces them to stand still. I'm clutching at straws now though.

It's a long shot, but it may be a pathing issue (ie. the NPCs don't know how to get to each other), but that's unlikely. Still, just toss some path nodes in between the two guys.

If those don't work, my suggestion would be to simply remake the NPCs from scratch. I assume you're only using them for this part, of course. If not, and you've got a whole quest lined up on them, we'll have to actually work out what this problem is... <_<
User avatar
Stat Wrecker
 
Posts: 3511
Joined: Mon Sep 24, 2007 6:14 am

Post » Fri Apr 30, 2010 9:30 pm

Fortunately, it is just fighting-- nothing overly fancy, but it is necessary to the Mod idea that they actually fight each other :(

When I'm back at my Modding PC, I'll have another look at them :)
User avatar
Leonie Connor
 
Posts: 3434
Joined: Mon Mar 12, 2007 4:18 pm


Return to IV - Oblivion