Pick up food on button- hunger system

Ho, So I followed this https://ww

w.youtube.com/watch?v=6ar7B__eOh0 tutorial by Virtus education. Everything is working fine, but I need to be able to pick up food on button pressed, not just on overlapping. Could you please help me? I tried to do branches and stuff< but it didn"t help. Please help me, I am desperate.

Also, why can’t I make a condition “on button pressed” in branch&?

UPD
OK, so I stored if the key was pressed as variable. In theory it should work but it doesn’t! Please help me

The on component event gets hit only once, when beginning or ending an overlap. So you will either need to store that you have pressed the button (On Pressed set a bool like you are, then unset when releasing).

However, it sounds like you want it so that when you overlap, then you want to press. So you will need to set some kind of bool for the overlap (OverlappingMyThing = true), then on the button press, check your bool and if so perform your action.