Scriptname CasChangeClothes extends ActorOutfit Property CasWorkOutfit AutoOutfit Property CasHomeOutfit AutoReferenceAlias Property Alias_Cas AutoEvent OnUpdate()RegisterForSingleUpdate(5.0)Actor Cas = Alias_Cas.GetActorReference() if Cas.IsInCombat()==true Cas.SetOutfit(CasHomeOutfit) else Cas.SetOutfit(CasWorkOutfit)EndIfEndEvent
This script is supposed to change the NPC's outfits when in combat. I attached it to the NPC. It compiles ,but doesn't work.
Help?
Also how could I check if the NPC's location changes and then set an outfit based on whether the location is an interior or not?
Could I use that in the same script itself?