Combining Inventory

Started by , Sat 23/08/2003 23:44:14

Previous topic - Next topic

Covert_owl

Let's say my player has three items in his inventory. A bowl, some dog food, and a key. Now, I want to make it so that when the player opens the inventory, they can click the dog food, then click the bowl and it'll combine to make a bowl of dog food. Here's what I've done to accomplish this so far:

I made my dog food object and my bowl object. Then I made a bowl full of dog food object. I know that it's going to add this object and remove the other two. And this is what I tried to do. I take the dog food from the inventory pane in the editor, go to interactions, Use Inventory on this item, and set up the events I described above. Now, here's the problem:

It works with anything in the inventory. I can take the key, click on the dog food, and I'll have a bowl full of dog food. How can I make the action more specific? So it reads, say, "Use Inventory 3 on this item" instead of just any inventory item.

Thanks--
Covert_Owl

TerranRich

This is (1) in the manual,  and (2) in the Beginners' FAQ.

www.harbinger-software.com/ags/faq/index.html

:)
Status: Trying to come up with some ideas...

Covert_owl

"How do I use one inventory item on another? I couldn't find this in the manual!

Well, you just didn't look hard enough. Look under Manual Contents -> Reference -> Interaction events -> Inventory item interactions"

D'OH!

dtm1980

Allright:

Go to "inventory items"
choose the dogfood
click on "interaction"
pick "use inventory on this item"
pick "run script"
script:
//script for inventory blah blah: Use inventory on  this item

if (character[yourcharacter].activeinv==number) //number of the bowl
  {DisplaySpeech(yourchar,"I combine these things");
    LoseInventory(no. for dogfood);
    LoseInventory(no. for bowl);
    AddInventory(no. for dogfoodinbowl-item);
    DisplaySpeech(yourchar,"Now i got a bowl of dogfood");}  
else DisplaySpeech(yourchar,"I cannot combine em");

Do it vice versa for the bowl with the dogfood so you will be able to
use bowl on dogfood and dogfood on bowl,

GL



SMF spam blocked by CleanTalk