Papyrus - Change actor weight via script?

Post » Wed May 15, 2013 7:58 pm

I tried asking this on another site, so I thought I'd increase my chances by asking here as well.

As the title suggests, I'm trying to make a generic magic effect that will change an actor's weight. The debug notifications are pointing out to me that I'm doing it right numbers-wise, but I'm not seeing a visual change unless I equip/unequip armor or clothing manually. Do I need to use single updates in some way, or call on the NPC node to make fractional height changes on each tick? Thanks in advance.

Scriptname lxlFatten extends ActiveMagicEffectEvent OnEffectStart(Actor akTarget, Actor akCaster)actorbase pakTarget = akTarget.GetActorBase()float Weight = pakTarget.GetWeight()float tWeight = Weight + 25.0while (Weight < 100.0 && Weight < tWeight)	Weight += 1.0	akTarget.GetActorBase().SetWeight(Weight)	akTarget.QueueNiNodeUpdate()	Utility.Wait(0.5)endWhileEndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster)EndEvent
User avatar
Dale Johnson
 
Posts: 3352
Joined: Fri Aug 10, 2007 5:24 am

Return to V - Skyrim