Jump to content

Unequip function: forcing unequip without dropping the item.


Recommended Posts

I've seen this be done a few times: Characters being unable to equip things like hats. But I don't want it to be that hassle of unequip, have it drop, and then be unable to  pick it up. I'm fixing up one of my old characters and plan to release him tonight or early tomorrow and I just need to do this, his quotes, and add DLC/non-DLC support (Same mod, yay!)

 

 

As you can see, he has blades for hands (he was the characer I replaced with Wurbert, but I've been wanting to release him recently)

post-286034-0-90818200-1400241480.png

 

I have: He can chop trees, mine rocks, hammer and attack without tools, but he works slower, can't equip any hand slot items, teleports when hit, has poor vision (Can only see some distance around him, the screen blurs), can only eat meat, and his transparancy changes depending on his sanity level (not seen in the screenshot)

 

I just want it so instead of dropping the item he just puts it back into his inventory. I would want to remove his hand-slot, but I want to have items he can attach to his blades to sharpen them.

 

EDIT: c_give("item", amount) seems to only work as a console command, unfortunately.

Link to comment
Share on other sites

Something like this? Second line won't reequip it.

local item = inst.components.inventory:UnEquip(EQUIPSLOTS.HANDS)inst.components.inventory:GiveItem(item)

Actually, first line is unnecesary if you're doing that in equip trigger since it passes item as a param but anyways...

Link to comment
Share on other sites

Something like this? Second line won't reequip it.

local item = inst.components.inventory:UnEquip(EQUIPSLOTS.HANDS)inst.components.inventory:GiveItem(item)

Actually, first line is unnecesary if you're doing that in equip trigger since it passes item as a param but anyways...

the UnEquip was suposed to be Unequip but other than that, it works perfectly. For some reason, the GiveItem never worked for me before now.

 

Thank you so much! 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...