SykesAtherton Posted March 6, 2012 Share Posted March 6, 2012 Hi there, I've never modded anything in my entire life. I'm looking for the script or whatever it's called that removes your items in game and places it in a chest. The same one that takes away all your stuff when you get arrested and sent to jail. I'd like to learn how to lump it in with the werewolf transformation so that all your gear gets removed temporarily when you transform. Anyone know the name of it? or where it can be found within the CK? Link to comment Share on other sites More sharing options...
tunaisafish Posted March 6, 2012 Share Posted March 6, 2012 It's a command: RemoveAllItems() Link to comment Share on other sites More sharing options...
alihast Posted March 31, 2012 Share Posted March 31, 2012 It's a command: RemoveAllItems()I've been trying to use this script command in a small mod item I'm working on... basically it's a garbage disposal unit (!) that I'm adding. It's a Dwemer button activator with a LinkRef to a Dwemer small chest container. Player uses the container to move clutter into, then activates the button to remove the container items. I have: ObjectReference property GarbageContainer auto in the main script header, and GarbageContainer.RemoveAllItems() within the activation event. It compiles fine, but doesn't remove anything - all items remain in the container. Any ideas where I'm going wrong? Link to comment Share on other sites More sharing options...
tunaisafish Posted March 31, 2012 Share Posted March 31, 2012 Did you remember to assign the property to the Ref in the CK? {*1} If you did, then make sure you're testing with a clean save.If it still isn't working add debug line in front of the line that is going wrong. In this case you'll want... Debug.Notification("Running RemoveAllItems on " + GarbageContainer) {*1} If you're using a linked Ref, then you shouldn't need to do that anyway, as you can use GetLinkedRef() instead. Link to comment Share on other sites More sharing options...
alihast Posted March 31, 2012 Share Posted March 31, 2012 Did you remember to assign the property to the Ref in the CK? {*1} If you did, then make sure you're testing with a clean save.If it still isn't working add debug line in front of the line that is going wrong. In this case you'll want... Debug.Notification("Running RemoveAllItems on " + GarbageContainer) {*1} If you're using a linked Ref, then you shouldn't need to do that anyway, as you can use GetLinkedRef() instead.Thank you! That was the one... I set ObjectReference myRef in the header then myRef = self.GetLinkedRef() myRef.RemoveAllItems()and that did it! Very many thanks for your input! :) Link to comment Share on other sites More sharing options...
tunaisafish Posted March 31, 2012 Share Posted March 31, 2012 glad to hear you got it sorted :) Link to comment Share on other sites More sharing options...
Recommended Posts