When I have a specific item in inventory, I want to turn on a special Menu. What is the best approach to doing it? I need an action that permanently checks inventory for the item.
A workaround would be using variables and cutscene on variable change but maybe there is an easier way?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
There are two approaches you can take: one using script, another using ActionList parameters.
Through script, you can hook into the OnInventoryAdd / OnInventoryRemove custom events to check if a given item is present, and control a Menu accordingly (either turning it on/off or locking/unlocking it).
For example:
With parameters, you could create a pair of ActionList assets that are used to add and remove an inventory item respectively using the Inventory: Add or remove Action, with both Actions having their "Item to add/remove" fields overridden with an Inventory item parameter.
Following these Actions, you could then run an Inventory: Check Action to check if the given item is being carried by the Player, and then update a Menu accordingly.
You'd then want to run these ActionList assets using the ActionList: Run Action whenever you wanted to add or remove an item, instead of using the Inventory: Add or remove Action directly.
A tutorial on ActionList parameters can be found here.