RemoveAllFactions()

Post » Tue Oct 06, 2015 12:44 am

Hello, there.

I'm trying to make a quest about catching an escaped criminal.

The alias is pointing to a bandit leader. I put a script on it with event OnEnterBleedOut()

Event OnEnterBleedout()    getActorRef().stopCombat()    getActorRef().removeFromAllFactions()    getOwningQuest().setStage(20)EndEvent

The dude drawn his weapon but immediately attack again me.

Does the RemoveFromAllFactions() works on respawnable NPCs?

User avatar
Vicki Blondie
 
Posts: 3408
Joined: Fri Jun 16, 2006 5:33 am

Post » Tue Oct 06, 2015 1:15 am

Looks like from the wiki page that it will not remove factions from the ActorBase, only the Actor reference.

User avatar
Conor Byrne
 
Posts: 3411
Joined: Wed Jul 11, 2007 3:37 pm

Post » Tue Oct 06, 2015 3:27 am

Alias is already pointing to actor.
User avatar
Kaley X
 
Posts: 3372
Joined: Wed Jul 05, 2006 5:46 pm

Post » Mon Oct 05, 2015 6:36 pm

No, I mean that RemoveFromAllFactions() will only remove factions you added to the actor via AddToFaction. If you did that though, then something else is most likely broken.

Edit: Misread the wiki page. May be completely wrong here. I assumed it would also function similarly to removing spells...

User avatar
Georgine Lee
 
Posts: 3353
Joined: Wed Oct 04, 2006 11:50 am

Post » Mon Oct 05, 2015 10:39 pm

Ok, I solved my issue. I had to create an ability spell which permanently "damages" his aggression value (since is ummodable via setAV())

Bandit leader is very aggressive at default.

User avatar
Trevor Bostwick
 
Posts: 3393
Joined: Tue Sep 25, 2007 10:51 am


Return to V - Skyrim