Jump to content

Mod making: GetWeight()


Recommended Posts

Posted (edited)

Hello 

 

Does anyone know why GetWeight() from the form script  (   https://falloutck.uesp.net/wiki/Form_Script  )   ran on any form returns only 0? 
Do I need to cast the form to something else so that that blasted GetWeight() can finally work?
I'm trying to get the weight of a weapon and can't figure it out, been chasing my tail for a long while 

I managed to track down and find a way to get the weight of an actual Object reference ( an instance ) 

 

    InstanceData:Owner thisInstance = new InstanceData:Owner
    thisInstance.Owner = akReference ;  ( an ObjectReference to my object that I want to weigh) 
    CurrentWeaponWeight= InstanceData.GetWeight(thisInstance)
    Debug.Notification("measuring weapon weight" + CurrentWeaponWeight)

 

But this does not work on leveled item instances, only on normal item instances.

at any rate, I would be more than happy in the case of leveled items to not inquire about the specific weight of that specific instance if that is not possible,  and go off  base object weight value  (for any leveled items), but that blasted GetWeight() refuses to return anything except 0

Edited by MSM_Alice

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...