You are implementing the button input on the pickup itself.
The problem: When you pick up a pickup, you destroy it afterwards. At least that seems to be happening from your screenshots. The only time it would react to your press of the “v” button would be while it exists and it doesn’t exist anymore once you pick it up.
Actually, what happens when there’s pickups in the level? Do they actually react to your button press? From the code, it looks like they would all spontaneously disappear.
Try to implement it on your character or player controller instead. Just remember to not call “destroy actor” unless you want your character to die every time he chugs a potion.
Two random tips:
- Your amount of potions is a float. Unless you want to be able to have 1.2 potions or something, an integer would make more sense.
- You can set button mappings under “input” in the project settings. This will allow you to write “use potion” instead of “v”, allowing you to remap “use potion” to anything else at a later point in time.