Forum rules - please read before posting.

Rename inventory/container items

edited August 2020 in Technical Q&A

I have three objects that exist in a container (or in the player's inventory if they have been picked up). I would like to update the name of these objects once the player learns or discovers something about them.

Given that AC seems to have already thought of every feature that enters my head, I'm sure that this is also possible.
Unfortunately, I haven't been able to figure it out. Before I go down the replace inventory items route, I was wondering if there was a rename function I was missing?

Thanks (and thanks for such a fantastic tool!)

Comments

  • edited August 2020

    Actually, replacing the items would be the way to go.

    It is possible to alter the names of items through script, but such changes would not be stored in save-game files: AC will save how many of each item are being carried, but not changes made to their names.

    Instead, best to create a second variant of each item - with the same graphic but different Label (if not name) property, and use the Inventory: Add or remove Action's "Replace" method to swap one for the other.

    That will work for items already in the inventory - but not for items in a Container. The Container: Add or remove Action can be used to add and remove items, but not replace one for another. I shall have to think about how this might be done.

  • Thanks Chris. I ended up nixing the container and just placing the objects in the scene, so that I could use the Hotspot: rename or Inventory: Add or Remove to replace as needed.

    It's working well!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.