DevilXD Posted April 2, 2014 Share Posted April 2, 2014 There is a little bug I found when I was making my own mod... I'm making a lightning sword... It will be charged by lightning, and uses a finiteuses component to count usage... I maked it unbreakable, so after finiteuses component reaches 0 uses, it removes finiteuses and it can be charged again... The problem is that removing finiteuses component doesn't remove a big "0%" from the inventory image...I was trying to fix it by adding a OnRemoveFromEntity() function, but I could not come up with the solution... Link to comment https://forums.kleientertainment.com/forums/topic/33879-finiteuses-and-item-tile/ Share on other sites More sharing options...
Developer Wade Posted April 2, 2014 Developer Share Posted April 2, 2014 Moving this to the Mod forums as it is more appropriate there. Link to comment https://forums.kleientertainment.com/forums/topic/33879-finiteuses-and-item-tile/#findComment-442392 Share on other sites More sharing options...
Heavenfall Posted April 2, 2014 Share Posted April 2, 2014 If it has infinite uses, why don't you just remove the component that counts down its usage? Link to comment https://forums.kleientertainment.com/forums/topic/33879-finiteuses-and-item-tile/#findComment-442533 Share on other sites More sharing options...
_Q_ Posted April 2, 2014 Share Posted April 2, 2014 If it has infinite uses, why don't you just remove the component that counts down its usage? The whole idea is in other thread.It is a sword that has infinite uses but get charged by lightning and finiteuses component is used to count uses for charged sword then component is removed when charges reach 0%, and that big 0% stays there until you pick up and put away the sword to other slot in invenotry. Link to comment https://forums.kleientertainment.com/forums/topic/33879-finiteuses-and-item-tile/#findComment-442609 Share on other sites More sharing options...
DevilXD Posted April 3, 2014 Author Share Posted April 3, 2014 The problem is exactly as _Q_ said... It should disappear after removing finiteuses, right? Or is my logic going wrong? BTW, here is the thread I was explaining it "in practice": http://forums.kleientertainment.com/topic/33846-widget-event/ Link to comment https://forums.kleientertainment.com/forums/topic/33879-finiteuses-and-item-tile/#findComment-443311 Share on other sites More sharing options...
Heavenfall Posted April 3, 2014 Share Posted April 3, 2014 I am curious as to what would happen if you just ran the inventorybar's Refresh() function? See inventorybar.lua Link to comment https://forums.kleientertainment.com/forums/topic/33879-finiteuses-and-item-tile/#findComment-443585 Share on other sites More sharing options...
DevilXD Posted April 4, 2014 Author Share Posted April 4, 2014 (edited) Hmm... I had to miss that file in my searchings... I will try do it this way, and I write if it works... EDIT: I solved the problem by splitting my prefab into two... Edited April 5, 2014 by DevilXD Link to comment https://forums.kleientertainment.com/forums/topic/33879-finiteuses-and-item-tile/#findComment-444263 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