You will need the two Overlap Events of your doors trigger box.
OnActorOverlapBegin
OnActorOverlapEnd
A bool variable in your PlayerController.
And a Tick Event in your PlayerController.
In the Begin Event, you set the bool to true
In the End event, you set it to false.
In your tick event, you get the bool and do a branch condition.
If true, you fired the trace event as you’ve done it l. BUT: directly after your door cast, you add a DoOnce Node. And on its Output, you put your Widget Showing code.
Back to the branch, right after your Tick Entrance. On thats false Output, drag a line to your widget hiding stuff. Again, on the beginning of that Task, put a DoOnce. After hiding the Widget, drag a new execution Line to the >Reset< Input of the DoOnce.
And, from the end of the Widget Showing Code, drag an execution line to the >Reset< of the hiding DoOnce.
DoOnce can only be fired once, if it won’t get a reset execution.
So your widget can only be set visible once, if not being resetted via the hiding… And vise versa.
And the tick event only runs, when the door trigger bool is set true.
What is that all doing:
When the Player enters the Trigger, he continuously starts firing traces, until he exits the trigger.
Each trace checks for doors to cast and change the visibility.
Here are some roughly made Graphs:
The Door Graph
An Event in the Player Controller, to change the bool
The Tick Graph in the PlayerController