Vampire Hood Mod

Post » Mon Dec 03, 2012 11:39 am

Below is the section of code from DLC1NPCMentalModel, I am trying to rework this to creat an RPG immersion mod where a player in Royal Vampire Armor suffering from sun damage would also be granted and equip the royal vampire hood the same as Serana does. This section of code is the one that causes serana to do exactly that I'm just not quite sure how to apply it to the PC as well and given that Serana continues to do so even if cured how to ensure that it's only if your a vampire and taking sun damage, any help would be greatly appreciated.

FormList Property SunDamageExceptionList autoArmor Property VampArmor autoArmor Property Hoodie autoFunction CheckOutfit()		Actor rnpcActor = RNPC.GetActorReference()		bool shouldWearHood = false		if (rnpcActor.IsInInterior())				shouldWearHood = false ; redundant line is redundant		else				WorldSpace currentSpace = RNPC.GetReference().GetWorldSpace()				if (SunDamageExceptionList.Find(currentSpace) < 0)						shouldWearHood = true				else						shouldWearHood = false				endif		endif		; put on hood if we're outside		if (!shouldWearHood)				if (rnpcActor.IsEquipped(VampArmor) && rnpcActor.IsEquipped(Hoodie))						Debug.Trace("RNPC: Inside, taking off hood.")						; rnpcActor.UnEquipItem(Hoodie) ; Ricky says this is no longer needed						rnpcActor.RemoveItem(Hoodie)				endif		else				if (rnpcActor.IsEquipped(VampArmor) && !rnpcActor.IsEquipped(Hoodie))						Debug.Trace("RNPC: Outside, putting on hood.")						rnpcActor.AddItem(Hoodie)						rnpcActor.EquipItem(Hoodie)				endif		endifEndFunction
User avatar
Kira! :)))
 
Posts: 3496
Joined: Fri Mar 02, 2007 1:07 pm

Return to V - Skyrim