Adding player to factions

Post » Fri Aug 05, 2011 11:26 pm

Hey guys,

I was following http://cs.elderscrolls.com/constwiki/index.php/Simple_Companion_Tutorial and I was wondering if it is possible to add the player to a faction but only while the NPC is following the player, and then remove the player from the faction when the player is not being followed?

Any help would be great,

Thanks,

Spec
User avatar
Sarah MacLeod
 
Posts: 3422
Joined: Tue Nov 07, 2006 1:39 am

Post » Fri Aug 05, 2011 10:51 am

You can use the OnPackageStart and OnPackageEnd blocks in a script on the NPC to adjust the player's factions using SetFactionRank.

If it's an existing NPC, not one you created for your mod, then it may be a bit more complex as you wouldn't want to edit the NPC to do that.
User avatar
Alyna
 
Posts: 3412
Joined: Wed Aug 30, 2006 4:54 am

Post » Fri Aug 05, 2011 4:28 pm

You can use the OnPackageStart and OnPackageEnd blocks in a script on the NPC to adjust the player's factions using SetFactionRank.

If it's an existing NPC, not one you created for your mod, then it may be a bit more complex as you wouldn't want to edit the NPC to do that.


Thanks for that ghastley, this will be very helpful to my objectives :twirl:

~ Spec
User avatar
kitten maciver
 
Posts: 3472
Joined: Fri Jun 30, 2006 2:36 pm


Return to IV - Oblivion