CloverNoir Posted December 6, 2021 Share Posted December 6, 2021 Hi so I want to make like 2 custom items for my character mod, but I want them to never be able to leave his inventory. I've seen mods that make things not be able to be unequipped but I want it to be able to be switched out for other stuff, I just don't want other characters using the weapon. Any help would be appreciated! Link to comment Share on other sites More sharing options...
skittles sour Posted December 6, 2021 Share Posted December 6, 2021 (edited) Making them undroppable is an extremity of a solution, and a more moderate solution would be to make other people not be able to pick them up. Recall that there is a base-game item that has this property, Lucy the Axe, and if you look inside the prefab file, you'll see that it listens for the on-put-in-inventory event, and then checks whether the pickupguy is its owner, if it is not its owner, it will then make the pickupguy drop it after 0 seconds. If you would like to opt for the extreme solution, you will have to override multiple functions in the inventory component. Since sometimes an item isn't "dropped" per se, for example when it is moved from an inventory to a container. This would also lend itself to certain exploits, for example, placing this undroppable item in the first slot of the inventory as a frog defense. Edited December 6, 2021 by Bad Willow 1 Link to comment Share on other sites More sharing options...
CloverNoir Posted December 7, 2021 Author Share Posted December 7, 2021 I'll try to use the code from Lucy's prefab but if it doesnt work I happened to find this block of code on one of the mods I have that does exactly what you said. If anyone is wondering from which mod it's from, here's the link to its workshop site https://steamcommunity.com/sharedfiles/filedetails/?id=1710872809 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now