I am trying to learn how to make assets for games in 3d and get them to work as I want in the engine.
So the project I am working on deals with having food and a bottle. Using the 3d Person Template. I want the Mannequin to walk up and click on the item which then prompts a message to the player
"Would you like to
Eat {FOOD}
Place {FOOD} in Inventory/BackPack
The player would then scroll up or down. Then middle click the mouse to choose.
That way when the player clicks on it. Then Once the character gets hungry he can eat the food or drink the water from his inventory.
Can someone point how what I would need to do this please I have looked at a few things and not found one yet that works like I would like it too do
You have to think of a data structure for your inventory and also need to think of the structure of your items.
Most of the time an array of Object References will do it for an inventory.
Interactions (Usage, Inspecting, Selecting etc.) can be done via UMG.
You should make a simple draft of your items.
Will there be more than food and drink? Will there be utility items that can be used? Will there be combineable items?
Create a class/blueprint that fits the minimum needs of an item (an item that can be picked up)
Create subclasses that handle the stuff for Food.
Create a subclass that handle the stuff for Drinks.
etc.
To select items that lay on the ground, Do a Line trace from the camera into the direction it points to.
If an Item is found, show the Actions of the Item via UMG for example.