Hi guys, I'm currently working on trying to script a simple modification where if a certain reference container contains a specific item, the script enables a referenced object in-game. Basically, I'm trying to something like the weapon wall from Underground Hideout. The base script I'm using as a reference however is not from UH, but instead the script from the TTW Interiors Rivet City player home that displays toys around your house depending on if they're in a chest or not. Here's what I have: SCN ItemDisplay Script
SCN ItemDisplay Script
Begin OnClose DisplayBoxREF
If DisplayBoxREF.GetItemCount WeapLaserRifle >= 1
LaserRifleREF.Enable
endif
If DisplayBoxREF.GetItemCount WeapLaserRifle == 0
LaserRifleREF.Disable
endif
endif
end
Here I'm trying to have a laser rifle static on the wall be displayed whenever a Laser Rifle is placed inside the container "DisplayBoxREF." The script saved fine in the GECK, and I have the script selected in the appropriate box for the Display Box base object, however in-game it doesn't appear to be working. The rifle on the wall is enabled initially, even when there is nothing inside the display box. There didn't seem to be much to the original TTW script, and that worked fine, so I'm not sure what I'm doing wrong. I don't know much about scripting so any help would be appreciated. I have made sure that I have "persistent reference" ticked on both references, and "initially disabled" ticked on the laser rifle however it still doesn't work.