Wintermute Engine > Technical forum

Objects picked up are not showing in Inventory Box.


Cliff White:
Hey All, I'm not sure what I'm missing here. I cannot seem to get any
taken inventory item to appear in the inventory box. After several days of
trying everything I could think of, I decided to start from scratch. But
even that didn't work.

 I started a new game and used all of the default items (default background and book item).

1. I added the book entity to the default Room.scene.
2. Then created the book.script.
3. I added the TakeItem action to the book.script in scenes ....

on "Take"

4. I verified that the book was referenced in the default items.items file and that
    the book.script file was present in the items directory.

5. I made no changes to the inventory.def file
6. When I run the program, everything seems to work as it's supposed to.
     When picked up, the book disappears from the screen, but does not appear
     in the inventory window and thus becomes unusable.

7.  There is no error reported in the log file.

Obviously, I'm leaving some step out. I just don't know what that step is.
Can somebody step me through the process on how to get an object to
appear in the inventory box?

Thank you!!!

Cliff White:
As usual, as soon as I post here for assistance, I stumble upon the solution.

In the book.script in scenes.... I changed this


to this


I don't know why this worked, but it did! and now I'm returning to coding my original game.

Hey Cliff :)

It's great you found an answer to this puzzle !!

Half way down this page, you'll find more information relevant to this situation.

--- Quote from: metamorphium ---there are two ways, how to approach inventory – Global (one inventory for the whole game) and Actor based – each actor has their own inventory
--- End quote ---


[0] Message Index

Go to full version