Forum rules - please read before posting.

Inventory highlight after item-pickup

Hello
I have an AC Menu on the bottom right that just acts as a button, when the player clicks it, the inventory opens.
I would like to set a different sprite for the button/menu when the player gets a new item into the inventory. Then, as soon as the player opens the inventory for the first time, the default button/menu sprite is back.
(To give the player an indication that the inventory has a new item in it)
Is this possible?

Comments

  • This can be done by modifying the appearance of the Menu at the same time you give the player an item. There're a couple of ways you could do this:

    1. Create a second Button - with the different graphic - in the same place, make it invisible, and then show it / hide the original with the Menu: Change state Action.
    2. If your Menu uses Unity UI, you could use a single Button and control it's sprite using animation - and then play that animation with the Object: Animate Action.

    In the Inventory menu's ActionList when turn on asset, you'd then do the opposite to revert its appearance.

    In terms of having this always occur whenever you pick up an item, you'd likely want to move the Actions into a separate ActionList asset, which uses parameters, which you can call each time.

    ActionList parameters allow you to modify an ActionList's field values at runtime. If you went with the first method above, for example, you'd create an ActionList than has an Inventory: Add or remove Action, a pair of Menu: Change state Actions, and then use an Inventory item parameter to override which item is added. You can then run this ActionList - specifying which value the parameter should take - whenever you want to add an item to the Inventory.

    I may be making it sound more complex than it is. You can find a guided example, however, in this tutorial.

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.