Can a script detect a weapon's weight?

Post » Tue Jun 19, 2012 2:59 am

Just curious. Would seem to make things go a lot smoother.

Any clue how to do it? Thank you :-)
User avatar
Danielle Brown
 
Posts: 3380
Joined: Wed Sep 27, 2006 6:03 am

Post » Tue Jun 19, 2012 10:02 am

I'm pretty sure that's not possible, unfortunately. Gonna have to hope SKSE adds a function for this.
User avatar
oliver klosoff
 
Posts: 3436
Joined: Sun Nov 25, 2007 1:02 am

Post » Tue Jun 19, 2012 2:40 am

Haha, oh well... will adapt. Thank you again! :-)
User avatar
Laura Hicks
 
Posts: 3395
Joined: Wed Jun 06, 2007 9:21 am

Post » Tue Jun 19, 2012 4:59 am

At the moment, I attach a Script to a Player alias.
Event OnInit ()    RegisterForUpdate (0.5)EndEventEvent OnUpdate ()    tick ()EndEventFloat inventoryWeightFunction tick ()    inventoryWeight = Game.GetPlayer ().GetActorValue ("InventoryWeight")EndFunctionEvent OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)    Float newInventoryWeight = Game.GetPlayer ().GetActorValue ("InventoryWeight")    Float weightOfItem = Math.abs (newInventoryWeight - inventoryWeight) / aiItemCount    ;...    inventoryWeight = newInventoryWeightEndEventEvent OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)    Float newInventoryWeight = Game.GetPlayer ().GetActorValue ("InventoryWeight")    Float weightOfItem = Math.abs (newInventoryWeight - inventoryWeight) / aiItemCount    ;...    inventoryWeight = newInventoryWeightEndEvent
It's a bit much but it works.
Currently, used in getting weight of food (for my Eat and sleep mod) and weight of weapons and armour (for my Encumbering loot armour and weapons).
User avatar
kristy dunn
 
Posts: 3410
Joined: Thu Mar 01, 2007 2:08 am


Return to V - Skyrim