Jump to content

[LE] Is there a way to make an Npc 'unattackable' or 'neutral' to all enemies?


sornan

Recommended Posts

Hello :)

 

I've got 4 Hobbits that are cowering at the presence of the Nazgul before them. Using a fleeTo package with proper flags keeps them in place and crouching in fear. Problem is, I have not yet found a way to stop the Nazgul from attacking them.

 

The player shows up and fights the Nazgul, so I can't prevent the Nazgul from being able to go into combat.

 

I've done quite a bit of searching on the web, and in the functions list, and can't seem to find a command to get an Npc to be in a 'state' where they would not be attacked by hostiles.

 

Is there a function that might work to make an Npc unattackable (will not be engaged), or is the only way to mess with scripting faction changes?

 

Any help appreciated.

 

TIA :)

Link to comment
Share on other sites

go to Character/Faction

create x2 factions

Hobbits and Nazgul

add hobbits to Hobbits faction in character/actor/your hobbit npc

add Nazgul to Nazgul faction

 

go back and edit each factions

in interfaction Relactions tab add new faction and change the Opposing/Affiiated Faction to PlayerFaction

set Group Combat Reaction to Neutral

 

add another faction to the list and this time change it to Nazgul faction and set Reaction to Neutral

 

edit the Nazgul faction

add playerfaction as Enemey

add Hobbits faction as Neutral

 

you are done , now the hobbits are neutral to player and Nazgul while player can fight Nazgul

Link to comment
Share on other sites

Thank you very much guys :smile:

 

 

Thanks Dylbill for the suggestions there -

 

The relationship I'd start with, just because in case it works, sounds like the easiest way to go. I can try StopCombat, I have not had success with it in the past but it takes a few moments to see if it might work. Factions may be the way in the end.

 

 

Thank you Skyflash for piecing all of that together, I appreciate that a lot, especially when I have never really messed with faction changes much.

 

I have a sense there's a good chance the faction adjustments will be the way, see what happens through some testing.

 

 

Ah, thanks!

 

:smile:

Edited by sornan
Link to comment
Share on other sites

Did a test run trying out Relationship, with the player and an Npc that was Bandit Faction, Relationship Ally, and it worked - the guy tried to kill my horse, and other nearby Npc's, but left me alone and even allowed dialog once he was out of combat. The downside, something I didn't know is that for Relationship to work, the actor must be Unique and therefore only one reference allowed. The Nazgul in the quest mod are not unique, and already added in editor and in script. I'd have to remove some things and add things to get it to work this way - but it does work, and is an option :smile:

 

Going to test the faction approach now, and if it works it may be the way as I should not have to modify existing content in the quest mod.

 

On a side note, the StopCombat I'm not quite sure how it would work, even if it did, as it looks like a Bool, not using actual actor references, and the Nazgul need to still be able to fight with the player. Anyhow, carrying on :smile:

 

/Edit

 

Not to triple post :p

 

Tried the factional changes, it works. I had to adjust factions to Ally state to prevent the Nazgul from attacking the hobbits and themselves as well, my suspicion is this is due to them being 'very aggressive' in their AI settings. Either way, it's great, they hold position nearby the cowering Hobbits, and then engage the player once in range.

 

Thanks everyone for the help. :)

Edited by sornan
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...