NikMik Posted November 22, 2013 Share Posted November 22, 2013 Hello again! One of my mod character's craftable robots are to act as a container. But when shift-clicking items into it, they disappear and you have to hit it with a hammer to get them back out. Is there a way to fix this? Here's the scripts in it's prefab that make it a container. Is anything missing?local function OnOpen(inst) if not inst.components.health:IsDead() then inst.sg:GoToState("open") endendlocal function OnClose(inst) if not inst.components.health:IsDead() then inst.sg:GoToState("close") endendlocal slotpos = {}for y = 2, 0, -1 do for x = 0, 2 do table.insert(slotpos, Vector3(80*x-80*2+80, 80*y-80*2+80,0)) endend-------------------------------------------------------------------- --(" container") inst:AddComponent("container") inst.components.container:SetNumSlots(#slotpos) inst.components.container.onopenfn = OnOpen inst.components.container.onclosefn = OnClose inst.components.container.widgetslotpos = slotpos inst.components.container.widgetanimbank = "ui_chest_3x3" inst.components.container.widgetanimbuild = "ui_chest_3x3" inst.components.container.widgetpos = Vector3(0,-180,0) inst.components.container.widgetpos_controller = Vector3(0,200,0) inst.components.container.side_align_tip = 160Any help would be greatly appreciated! Link to comment https://forums.kleientertainment.com/forums/topic/29901-shift-clicking-in-mod-containers/ Share on other sites More sharing options...
seronis Posted November 22, 2013 Share Posted November 22, 2013 (edited) I'm gonna assume your prefab has both an inventory AND a container component, and the shift clicking is going into the inventory. You didnt post the mod so I dont know for sure Edited November 22, 2013 by seronis Link to comment https://forums.kleientertainment.com/forums/topic/29901-shift-clicking-in-mod-containers/#findComment-375680 Share on other sites More sharing options...
NikMik Posted November 22, 2013 Author Share Posted November 22, 2013 (edited) I think it might. I'll check to make sure. EDIT: He did, and removing it fixed the problem. Thank you! Edited November 22, 2013 by Mr. Tiddles Link to comment https://forums.kleientertainment.com/forums/topic/29901-shift-clicking-in-mod-containers/#findComment-375685 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