Press button to activate a timeline

Hey, I’ve made this blueprint so that when the player picks up a key and enters the filing cabinets trigger box, the drawer opens, but I want to do it so the player has to press the ‘F’ key for example so the draw opens. I have tried to bind an overlap for the collision box but it says it can’t delegate. See attached pic for extra details. Thank you in advance.

Make a bool bIsInRange or something, when the player enters the collision volume, set it true, and when they leave set it false.
Replace the OnOverlap event with the F input event, then just branch on that bool, so when you input F, it will only work if they are in range, i.e. the bool is true


Thank you for the help (again ha) but I’ve tried to understand exactly what you mean but it’s not working. See the pic attached to see what I’m not doing right xD haha, and thank again for your help

No problem, here’s what I meant:

When the player overlaps your collision box, the bool is set to true, when they leave the collision box its set to false. The input only works when this value is true.
Note that you no longer need the class check before you cast to get the inventory, as only the player overlapping can set the bool true anyway.

So get your player now, use a Get Player Pawn node, and cast to your character, then it’s the same as before. So the after the branch on F, get your player pawn, cast it it, and branch from the Contains node (the rest is the same).

edit: I jsut realized the comment on my reroute node is wrong, you need the Get Player Pawn node and cast first.

Okay so I’ve done that and it still doesn’t seem to be working, or maybe something is missing or in the incorrect place? Thanks

Is input enabled on the cabinet actor? You do this by clicking it in the level, and in the details panel look for “Auto Receive Input”, set this to player 0.

Put a print string after the branch on F also, to see where it is failing. Though it’s probably just input isn’t enabled

Ah that was it, thank you for the help again! :slight_smile: