One to many in "Inventory"

Here is a problem I'm having:
I pick up some 'arrows of type one'. The icon shows up in inventory like it's supposed to. The amount is stored in a global for use later. Then, I pick up another 'arrows of type one' and I get a number(2) on the original icon. How do I delete this when I pick it up, so that it never shows in the inventory? (the amount is transfered correctly - so that is not the problem.)

------------------
-Albadar-
- - - - - - - - - -
Just trying...

Quote

Originally posted by Albadar:
**Here is a problem I'm having:
I pick up some 'arrows of type one'. The icon shows up in inventory like it's supposed to. The amount is stored in a global for use later. Then, I pick up another 'arrows of type one' and I get a number(2) on the original icon. How do I delete this when I pick it up, so that it never shows in the inventory? (the amount is transfered correctly - so that is not the problem.)
**

Let's see if I read you correctly: You want 'arrows' to be in inventory when you find them but you want the number of those arrows to be stored in a global and the inventory just shows that you have some arrows. If that is so, place a conditional on 'use from map.' If player possesses 'arrows' then set 'arrows' minus one. If not so, do nothing. This will place the first ones found in the inventory list and keep the subsequest findings from adding a munber to the inventory picture. Your global will be completely independant of the inventory list as long as some arrows remain.

Example: First batch of (6) arrows found - 'take' places arrows in inventory, set gb_arrows + 6. Second batch of (3) arrows found - 'take' now adds one to arrows but immediately subtracts one so inventory shows just arrows. gb_arrows + 3 = 9.

Additional conditional on arrows: If gb_arrows < 1, then delete arrows from inventory list. I assume here that each time you use an arrow the gb_arrows reduces by one.

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
(url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/damsels.sit?path=pog/addons&file;=damselsV1.1.sit")Damsels in Distress(/url) - A plugin for PoG.

Quote

Originally posted by Rubber Ducky:
... and the inventory just shows that you have some arrows.

Not quite. It's the icon in the inventory that is incrementing up. I can't seem to get it go away as I pick up a new batch. ie the second batch (no matter the size) places an icon (new arrow icon) on top of the first batch and calls it two(2). Like when you get another apple, it displays two(2) apples. Hope that explains it better.

------------------
-Albadar-
- - - - - - - - - -
Just trying...

Quote

Originally posted by Albadar:
**Not quite. It's the icon in the inventory that is incrementing up. I can't seem to get it go away as I pick up a new batch. ie the second batch (no matter the size) places an icon (new arrow icon) on top of the first batch and calls it two(2). Like when you get another apple, it displays two(2) apples. Hope that explains it better.
**

Ok, so you have to have two different types of items. The first is the inventory item 'arrows' which does nothing but indicate that you have some. The second type is the batch that you pick up. Each batch can be unique if you wish. When you pick it up, it adds to the inventory list one of the first type (unless you want it to appear only as 'arrows' as outlined above.) In this case you do not want to check 'take' but you do want an item wizard to add one of the inventory types. Does that make sense?

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
(url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/damsels.sit?path=pog/addons&file;=damselsV1.1.sit")Damsels in Distress(/url) - A plugin for PoG.

Quote

Originally posted by Rubber Ducky:
Ok, so you have to have two different types of items. The first is the inventory item 'arrows' which does nothing but indicate that you have some. The second type is the batch that you pick up. Each batch can be unique if you wish. When you pick it up, it adds to the inventory list one of the first type (unless you want it to appear only as 'arrows' as outlined above.) In this case you do not want to check 'take' but you do want an item wizard to add one of the inventory types. Does that make sense?

Here's what I'm try to do. I have one type of arrows. It shows an icon that has three arrows on it. this part works great! The problem starts when I pick up the second group of arrows. A "same" item is added to the inventory and the icon (with the same three arrows) adds to the existing icon (now showing the number 2 on the original icon). Using "drop item" doesn't get ride of the second item. I might be missing your point, but it doesn't feel like I am. (By the way, how do I "minus one" from the displayed icon in the inventory if drop item doesn't work when you pick up an item.)

------------------
-Albadar-
- - - - - - - - - -
Just trying...

Maybe I am missunderstanding you as well, but why don't you uncheck the "take" box? Just use the "Action Link". Ignore the "Condition".

In the Action Link, make a conditional action. Check if player has "Arrows".
-If not, add "arrows" to inventory, and add to the quantity global
-If so, Only add to the quantity global

Arrows are only added to the inventory once. But your global stored quantity increases. Yes?

myshkyn

------------------
"I'll give the fans just what they want, and nothing else at all."

Quote

Originally posted by myshkyn:
**Maybe I am missunderstanding you as well, but why don't you uncheck the "take" box? Just use the "Action Link". Ignore the "Condition".

In the Action Link, make a conditional action. Check if player has "Arrows".
-If not, add "arrows" to inventory, and add to the quantity global
-If so, Only add to the quantity global

Arrows are only added to the inventory once. But your global stored quantity increases. Yes?

myshkyn**

Too easy! That works. I was hope for the floating words, but that's out of the question I guess. Thanks to both of you. ( my life is simplier.)

------------------
-Albadar-
- - - - - - - - - -
Just trying...

I think we're getting close to being on the same wavelength. I'll take this slowly. What I think is happening is that your batches of arrows are unique. In other words, they are either separately identified or perhaps they contain differing numbers of arrows. But you have 'take' checked and a picture for inventory with the same inventory name. Since they are unique on the map, the Coldstone engine puts them into inventory as separate items but because you can't have two separate items with the same name, the CGE adds the number 2 to the second item entered.

Here's what you have to do: Remove the inventory picture from the items by unchecking the 'over-ride default inventory picture' on the Misc tab for items which will be placed on the map and uncheck the box marked 'take'. Now create a new item which you can name invArrows. This item has no pictures on the 'display' tab of the item editor but does have the inventory picture of your three arrows. Now go back to your items for the map and in the box marked 'Action link - Edit' place an item wizard which puts one invArrows into inventory. (Here is where you can limit the inventory display to one if you wish.) For this you do not use 'drop item' as such but rather an item wizard in the action link which drops one if the conditional says there is already one there.

This is, BTW, exactly what I had to do for about 400 toadstools in my plugin.

Since 'take' is no longer checked, you will not get the floating name "arrows" which rises like the mist on a September morning. If you want this effect, it can be done by creating an animation of the word and placeing the animation stamp into the action link as well.

Are we now coming close to a meeting of the minds?

Edit: Actually the item with the inventory picture should be named "Arrows" and the batches of arrows on the map can be named anything else you want because the one in inventory will have its name displayed and the ones on the map will never show their names.
------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
(url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/damsels.sit?path=pog/addons&file;=damselsV1.1.sit")Damsels in Distress(/url) - A plugin for PoG.

(This message has been edited by Rubber Ducky (edited 07-30-2003).)

Quote

Originally posted by Rubber Ducky:
I think we're getting close to being on the same wavelength.

Yes, That's what I thought you were tralking about. I don't get a seperate item, RD.
Instead, like when you pick up a second apple, you get number two in the inventory screen. (Not another apple with a 2 on it). Here try this.

Create an item called parchment. Add a graphic of paper from the future;items; art library. Add a inventory icon of anytype (I used a rock). Go back to the "Map Options" area, press "Event" of the action link. In here, (left side only) place dialog "It crumbles in you hand." Then Item wizard; remove parchment. (This doesn't work) This is my problem!

------------------
-Albadar-
- - - - - - - - - -
Just trying...

Quote

Originally posted by Albadar:
**. .Create an item called parchment. Add a graphic . . . Add a inventory icon . . . Go back to the "Map Options" area, press "Event" of the action link. In here, (left side only) place dialog "It crumbles in you hand." Then Item wizard; remove parchment. (This doesn't work) This is my problem!
**

Have you tried this?: action link -

Left side . . . . . . . . . . . . . . Right side . . . . . . . .
dialogue . . . .
conditional (if hero possesses
parchment) . . . . . . . . . . . . . . Item wizard; remove parchment.

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
(url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/damsels.sit?path=pog/addons&file;=damselsV1.1.sit")Damsels in Distress(/url) - A plugin for PoG.

Quote

Originally posted by Rubber Ducky:
Have you tried this?:

Yes, that doesn't work either. I have spent way to much time trying to make this work. I'm to almosta full day (including the removing everything that has to do with arrows and then rebuilding it one step at a time) I will have to settle for this method of:
test for do I have then .. else add arrows
add to cntr.
At least it does work. Thanks again RD.

------------------
-Albadar-
- - - - - - - - - -
Just trying...