Hold E to Drink/Eat

Hello, im currently asking about how I might make a Drinking/Eating system similar to the one found in the video below. Ive tried making it myself, but I keep running into issues. Any advice/guidance would be great here. Thanks!

Hi!

Is there anything you crafted already? If so you can show them even there is problems about system (input, detection, cancellation, animation, positioning). Community can offer architecture, advice or pin point bugs.

If you are looking for just overall advice to crafting an interaction system we can give, there are some already forum topics, there is one that I did a while ago and many video tutorials on Youtube.

In the blueprint of the actor you want to drink/eat, you can add a collision box or mesh and scroll down to find the OnComponentBeginOverlap, and click the + to make an event for when it overlaps. You can then have it cast to your player character and set a bool variable(For example, CanEat or CanDrink.)

Then, in the character blueprint, when you press E add branches for your variable(s) and have your eating and drinking code.

Well ive removed all of my former code to create it in a more stable way for what im trying to achieve.

I made a separate volume actor that I can put along the edges of lakes, rivers, etc.
My issue is that im trying to make it so, I can hold E, and it will actually trigger an event During the hold time.

Often so far, every tutorial ive found. Just makes it so after you hold it for a certain amount of time, the trigger fires. Which is not what im trying to achieve :slight_smile:

I have it also set up, so that once they enter said volume it changes a variable within the Character BP, to can_drink=True

Ill show with images below :slight_smile: