I just noticed that when same item is put into inventory several times, it shows just one icon, but it keeps track of number of items; and when you lose one of the items, rest of (same) items still stay in inventory. Is there an easy solution (I want item to dissapear even when there are multiple copies of that item in inventory), or do I have to code conditions for each object?
in the general settings pane, on the right side "Use multiple inventory items, multiple times"
tick that box
I think what he meaned was he really want the items to disappear immediately when they're used. In that case, he may really need to design the game so the player won't get copies of an item.
Quote from: Gilbot V7000a on Tue 14/09/2004 08:31:07
I think what he meaned was he really want the items to disappear immediately when they're used. In that case, he may really need to design the game so the player won't get copies of an item.
Yes, that's the case. So, there is no way of doing it automaticaly (considering any number of same objects represented by same icon- one object). Never mind, it's just a few hours more work.
If it's something you're likely to need a lot, you could create a custom function. I think the LoseInventory command is equivalent to character[GetPlayerCharacter()].inv[item] -= 1;, so you'd just need something like:
function LoseInvAll (int item) {
character[GetPlayerCharacter()].inv[item] = 0;
UpdateInventory();
}
Are you telling me that:
character[GetPlayerCharacter()].inv[item] = 0;
means that all of the same [item] items will dissapear? If I understood it right, that the complete solution!
Yep, that's it. Inventory items are treated like variables.
Yes, but things gonna change in the newest version (still in beta phrase), let's see how this would be settled eventually.
instead of having the items added in the first place, could the object not be removed fromt he room but not added to the inventory? or have multiple items, one for each amount of individuals and have the items swapped when a new item is "picked up".
yeah, i heard it.
Yes, on the end I decided that not giving additionnal items would be the best solution.