Hey, everyone! So, I've got a dummy NPC in a hidden cell that I'm using as a storage container. I'm trying to make a backpack that doesn't just increase the player's carrying capacity by a fixed amount, but rather actually has a limited storage capacity. Problem is, calling "DummyREF.GetAV InventoryWeight" in my script always returns 0. It doesn't matter if I'm setting it as a variable (i.e. "set CurrentWeight to DummyREF.GetAV InventoryWeight") or if I'm using it in a condition (i.e. "if DummyREF.GetAV InventoryWeight > 50"), none of my scripts will trigger because the value always returns 0.
The dummy NPC does not have an actor script, has no AI packages, and none of the flags (i.e. No Low Level Processing, Essential, Respawn, No VATS Melee, etc.) are set. I'm calling "DummyREF.OpenTeammateContainer 1" in my activator script to open the inventory, which seems to be working fine. It's just that nothing else that relies on GetAV InventoryWeight works.
Here's what my script looks like at the moment:
scn aaaSCPTBackPackActivator int Button int BackPackFull float CurrentWeight float PreviousWeight int InvWeightRestore begin OnActivate Player set CurrentWeight to (BackPackREF.GetAV InventoryWeight) ShowMessage aaaMESGBackPackMENU CurrentWeight aaaGLOBPackWeightMax end begin OnAdd Player Player.EquipItem aaaARMOBackPack 0 1 end begin GameMode set Button to GetButtonPressed if (Button == 0) BackPackREF.OpenTeammateContainer 1 elseif (Button == 1) Player.AddItem aaaARMOBackPack 1 if (BackPackREF.GetAV InventoryWeight > aaaGLOBPackWeightMax) set BackPackFull to 1 set CurrentWeight to (BackPackREF.GetAV InventoryWeight) Player.ModAV InventoryWeight CurrentWeight set PreviousWeight to CurrentWeight elseif (BackPackREF.GetAV InventoryWeight <= aaaGLOBPackWeightMax) && (BackPackFull == 1) set BackPackFull to 0 set InvWeightRestore to (0 - PreviousWeight) Player.ModAV InventoryWeight InvWeightRestore endif Disable MarkForDelete endif end
Any insight is appreciated!
EDIT: Using the console to run "GetAV InventoryWeight" on some base game NPCs also returns 0, which suggests that this actor value only works on the Player. But then that raises the questions, how do companions know when to speak their overburdened dialog? And can I use that as a condition check instead?
Edited by user826, 05 June 2020 - 08:22 PM.