x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to make a toggle-able UI?

When i press 'I' i want a UI to open(This part i can do), but when i press 'I' again i want the UI to go away. How can i do this?

Product Version: Not Selected
Tags:
more ▼

asked May 10 '15 at 02:01 AM in Blueprint Scripting

avatar image

DrakeWalker
91 30 30 32

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I'm assuming you'll be using UMG. Just have your event go into a flip flop node. When 'I' is first pressed, create the UI, and store it to a variable. When it's pressed again, use the remove from parent node to remove the UI element.

Otherwise, if you don't want to be creating and destroying your UI every key press, you can just toggle it's visibility by using the set visibility node, or calling an event inside your UMG to hide particular elements.

I'd also recommend taking a good look through Unreal's youtube page, and documentation. They have some good tutorials on UI, like their inventory tutorial.

more ▼

answered May 10 '15 at 05:17 AM

avatar image

Zapheroc
303 8 7 30

avatar image DJJoachim Mar 31 '17 at 04:48 AM

could you please provide a blueprint detailing this information. I'm trying to make it to where the widget is created when the game starts ( in the event graph of my HeroCharacter) and when I press the I key and inventory is opened, pressing the key a second time should close the inventory. I'm trying to follow the instructions you've provided but i cant seem to get it to work. Visuals would help me greatly, thank you so much in avance!

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question