Thomas Die Posted February 1, 2019 Share Posted February 1, 2019 this is a simple question but is it possible for a character specific item i tried to use the one from don't starve but it seems impossible now Link to comment Share on other sites More sharing options...
IronHunter Posted February 1, 2019 Share Posted February 1, 2019 Define character specific? If you mean only your character can make like wickerbottom's books or wigfrid. Then you need to add your character's unique tag to the items recipe. If you mean the item can only be equipped or picked up by your character like Lucy, then you would have to emulate something similar. Link to comment Share on other sites More sharing options...
Ultroman Posted February 2, 2019 Share Posted February 2, 2019 IronHunter is right. In order to keep other characters from picking up the item, and preventing duplicate characters from picking up each other's items, you'd have to do something like this: AddPrefabPostInit("YOUR_ITEM_PREFAB_NAME", function(inst) local oldOnPickup = inst.components.inventoryitem.OnPickup inst.components.inventoryitem.OnPickup = function(self, pickupguy) if pickupguy.prefab == "YOUR_CHARACTER_PREFAB_NAME" then if not self.inst.itemowner then self.inst.itemowner = pickupguy end if pickupguy == self.inst.itemowner then oldOnPickup(self, pickupguy) elseif pickupguy.components.talker then pickupguy.components.talker:Say("That item is not mine.") end elseif pickupguy.components.talker then pickupguy.components.talker:Say("I cannot wield that.") end end end) Link to comment Share on other sites More sharing options...
Thomas Die Posted February 2, 2019 Author Share Posted February 2, 2019 my own character can use the book i created but people like maxwell can not Link to comment Share on other sites More sharing options...
IronHunter Posted February 2, 2019 Share Posted February 2, 2019 You could just clone the reader and book components and actions and make them exclusive to your character to read. 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