Difference between revisions of "UpdateWeight - Actor"
m
→Examples: rearranged alittle for a bit more clarity
imported>Bot Owned (Created page with "Category:Scripting Category:Papyrus Category:SKSE '''SKSE Member of:''' Actor Script Visually updates the actors weight. == Syntax == <source lang="papyrus">...") |
imported>Bot Owned m (→Examples: rearranged alittle for a bit more clarity) |
||
Line 22: | Line 22: | ||
float PlayerOrigWeight = PlayerRef.GetWeight() ;Collect the Player's original weight. | float PlayerOrigWeight = PlayerRef.GetWeight() ;Collect the Player's original weight. | ||
float PlayerNewWeight = Utility.RandomFloat(0.0, 100.0) | float PlayerNewWeight = Utility.RandomFloat(0.0, 100.0) | ||
Float NeckDelta = (PlayerOrigWeight / 100) - (PlayerNewWeight / 100) ;Work out the neckdelta. | Float NeckDelta = (PlayerOrigWeight / 100) - (PlayerNewWeight / 100) ;Work out the neckdelta. | ||
PlayerRef.GetActorBase().SetWeight(PlayerNewWeight) ;Set Player's weight to a random float between 0.0 and 100.0. | |||
PlayerRef.UpdateWeight(NeckDelta) ;Apply the changes. | PlayerRef.UpdateWeight(NeckDelta) ;Apply the changes. | ||
</source> | </source> |