Forum rules - please read before posting.

Changing inventory item label

Is there a way to change the label of an inventory item during gameplay? I am looking for a similar action like Rename Hotspot, but I could not find anything for the inventory.

Comments

  • Not without scripting - unlike Hotspots, inventory data is stored in asset files.

    The easiest way around this is to create a second instance of the item - i.e. same graphic - but with a different label. You can then swap one for the other using the Inventory: Add or remove Action's "Replace" option, giving the effect of its name being changed.

  • Thanks! I was thinking about the same solution you mentioned, but I was curious if there is another way.

  • I just wanted to check if having multiple items is still the preferred way to do this?

    It would be nice with something similar to hotspot.SetName("new label", lineId) if possible. But I guess the way they are stored might make this difficult.

    Thanks

  • Changing the name directly would involve updating the raw asset data, which I don't recommend.

    Technically, it is possible - right-click the item's Label (if not name) field label to get an API reference to it that can be set at runtime. Such a change will persist upon exiting Play Mode, however.

    Swapping the item out for another is the safer approach.

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.