Furious_Monk Posted November 10, 2015 Share Posted November 10, 2015 Hey folks, just a strange issue happening here, hoping someone can point out what is wrong. module Base{ item Compost { Type = Drainable, DisplayName = Compost, Icon = Sandbag, Weight = 2.0, UseDelta = 0.1, UseWhileEquipped = false, }} Shouldn't that mean that the "Compost" item in my bag weighs 2 lbs. and disappears after 10 uses?Well when I use the item as intended, I wind up having no drain on the green "remaining" bar, but the weight of the item shifts to 0.6. What's going on? One last thing, how do I make this piece of code: item CompostEmpty { Type = Normal, DisplayName = Empty Composting Bag, Icon = SandbagEmpty, Weight = 0.001 } generate the Empty item when the Compost item actually does get depleted? Thanks! Link to comment Share on other sites More sharing options...
blindcoder Posted November 11, 2015 Share Posted November 11, 2015 To use the empty version when the compost is empty, add this:ReplaceOnDeplete = CompostEmptyThe Drainable itself should work from the code. How do you use it? just by calling the :Use(); function or somehow else? Link to comment Share on other sites More sharing options...
Furious_Monk Posted November 11, 2015 Author Share Posted November 11, 2015 Hey blindcoder, I have it fixed to an extent now. The item now properly drains in 10 uses. It was due to something in related to the problem in this thread: http://theindiestone.com/forums/index.php/topic/17062-question-isfarminginfolua-le-not-defined-for-operand/ I believe my item is still getting it's weight reduced to .6 from 2 instantaneously on the first use. Shouldn't it go down to 1.8 lbs? I am not getting the bag to turn into an empty bag right now, but I think that is something I have to add to the original item. Link to comment Share on other sites More sharing options...
blindcoder Posted November 12, 2015 Share Posted November 12, 2015 If you have items equipped in a hand, the weight gets reduced, maybe it's that? Link to comment Share on other sites More sharing options...
Furious_Monk Posted November 12, 2015 Author Share Posted November 12, 2015 You are correct sir! Thank you. 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