Hello, I'm trying to check player inventory for a given item, but the item name shall be defined by given variable.
Use case: To open the doors, player need to have relevant key in his inventory.
Solution #1 I'm trying to implement now: Each "Doors" object have "key_name" variable in it's Object variables, defining the name of the Key needed to open the doors. Then in a Game Event, I'm using "Has In Inventory" node to check if an item of the given name is present in the inventory or not.
Issue: I'm able to read the Object variable successfully, but "Has In Inventory" node is always returning "Failed", never "Success" (despite the item named "Rusty key" is present in the Player inventory).
When I select the item manually (not using selected data) then it works, but in such case I would need dedicated Game Event for each Doors - absolutelly no way.
What I'm doing wrong? Variable settings in "Has In Inventory" seems a bit odd...
Thank you in advance for your support!
Bonus: solution #2 (wanted): Better, I would like to check the inventory items based on it's name and also Item Variables, so I could have many keys with the same name ("Key"), /but of different prefab = colour, shape, etc../ and use each Item Variables to link them to the relevant doors.