Press E to open Widget, Press again to close
When overlap the box I can press E to see a widget. But how to remove the widget by pressing E again?
asked Sep 25 '18 at 11:41 AM in Blueprint Scripting
First off, i dont have access to my pc so sorry, but first attach the end overlap to the close gate (gotta love being a smartass) but the way i do it is create the widget with beginplay and set it's visibilty to hidden. And from the gate exit do a flip flop with A setting the widget to visible and B setting it to invisible (cant remember the exact node but i think its set visibility) Hope this helps.
answered Sep 25 '18 at 11:50 AM
at the most basic all you need is a flipflop and a remove from parent node. as shown in the example below, with a flipflop the first time you press the input key it uses the A pin and the second time the input is presses the B pin is used.
its pretty simple though there are a few things to note, first you probably want to promote the widget reference to a variable, once thats done you may want to switch from a flip flop to a isvalid? type setup for more advanced implementations.
answered Sep 25 '18 at 12:47 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here