Scriptname PCKP_FaceShiftScript extends activemagiceffectevent OnEffectStart(Actor Target, Actor Caster);Caster.KillSIlent()ActorBase CasterB = Caster.GetActorBase()ActorBase TargetB = Target.GetActorBase()int HeadPartsN = TargetB.GetNumHeadParts()int i = 0 while i < HeadPartsNif TargetB.GetNthHeadPart(i) as HeadPartCasterB.SetNthHeadPart(TargetB.GetNthHeadPart(i), i)CasterB.SetFaceMorph(TargetB.GetFaceMorph(i), i)endIfi=i+1endWhileCasterB.SetWeight(TargetB.GetWeight())CasterB.SetHairColor(TargetB.GetHairColor());Caster.disable();Caster.enable()endEvent
Trouble is, I get no compiler errors, but the thing crashes the game so fast that seemingly the debug log doesn't even have time to register whatever is going on. Now, I have never seen anyone else using these functions nor is there any documentation for them on the wiki. Can they be used this way?
ALso, I've switched the actor and target around before (to make the target become a copy of me) thinking that the problem might be simply that the player's face can't be manipulated ad hoc. This also crashes the game.
Next thing I'm going to try is disabling the actor, then making the changes, and finally re-enabling them. We'll see if that helps.
EDIT: Nope, still crashes immediately.