kaTome Posted May 17, 2022 Share Posted May 17, 2022 I am trying to make a mod based on 'Drop your lantern on the ground' that will drop a single lightbulb on the ground from your stack. I can basically follow the same patterns used in the original mod, however to drop a *single* lightbulb I am calling DropItemFromInvTile(item, 1). This seems to work in worlds where caves are disabled, but when caves are enabled it doesn't drop anything. Does anyone know how to fix this? Original mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1659235004 Link to comment https://forums.kleientertainment.com/forums/topic/140313-dropitemfrominvtile-with-caves/ Share on other sites More sharing options...
HarryPPP Posted May 19, 2022 Share Posted May 19, 2022 (edited) Well, I looked inside "inventory_replica.lua" and it seems that "DropItemFromInvTile" requires an entity and a boolean... that would mean that you need to replace the 1 with true. So: DropItemFromInvTile(item, true) This way, you will drop one item from the stack. Edited May 19, 2022 by HarryPPP 1 Link to comment https://forums.kleientertainment.com/forums/topic/140313-dropitemfrominvtile-with-caves/#findComment-1571514 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