copies of items

Started by BorisZ, Tue 14/09/2004 06:47:39

Previous topic - Next topic

BorisZ

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?

Scummbuddy

in the general settings pane, on the right side "Use multiple inventory items, multiple times"
tick that box
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Gilbert

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.

BorisZ

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.

Ashen

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:

Code: ags
function LoseInvAll (int item) {
  character[GetPlayerCharacter()].inv[item] = 0;
  UpdateInventory();
}
I know what you're thinking ... Don't think that.

BorisZ

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!

TerranRich

Yep, that's it. Inventory items are treated like variables.
Status: Trying to come up with some ideas...

Gilbert

Yes, but things gonna change in the newest version (still in beta phrase), let's see how this would be settled eventually.

Sam.

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.
Bye bye thankyou I love you.

BorisZ

Yes, on the end I decided that not giving additionnal items would be the best solution.

SMF spam blocked by CleanTalk