How to disable an interaction prompt/trigger after a condition has been met?

Hey y’all. So I’m new to Unreal and I’m just getting started on blueprints. I created a simple blueprint where I have a lever I modeled that is triggered once the player goes up to it and presses the F key. But I also have an interaction prompt that says “[F] Pull” that goes on and off depending on whether or not the player is in the collision box. My idea is that you can only pull the lever once and not back and forth.




The problem is, I want to disable the widget completely after the player has pulled the lever. But since I’m using the On Begin Component Overlap node, the widget will show up whenever I leave and re-enter the collision area. I tried exploring a few other nodes but the overlap node can only connect to one other node. (I also want to note that I have two separate collision boxes in my lever blueprint, one for detecting the player and another for triggering the widget visibility.)

I tried the Do Once node, but then the widget won’t appear if I exit the collision area even if I haven’t hit the prompt yet. I still find Booleans a bit confusing as well, as can’t connect any of these conditions to them. What am I missing or glossing over?

As a bonus: The lever animation has a similar problem where it won’t play the animation until the player comes up to it and hits the trigger, but if they enter and leave the collision box the trigger will still work.

1 Like

User input goes into the player BP or its controller, not into the controlled item (there are exceptions, ofc). Having F inside the lever BP is not a good idea - same goes for enabling input. It’s disabled by default for a reason. Have a look at how a standard interaction system is made:

https://www.youtube.com/results?search_query=ue5+interface+interact

Once you have a system like this set up, have it set a boolean variable inside the lever indicating it has been activated. Whenever we send a message to the level, we query that variable and act accordingly.

In short:

  • the lever has a boolean variable
  • the player presses F and uses a interaction object
  • the object (here, the lever) acts:
    • if its variable is True, it does nothing
    • if it’s False, it plays the Timeline, and sets its variable to True