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"

Communication between widgets

Hello everybody!

I am currently trying to make a GUI for our game. For now, I have a title screen spawning at the start with working buttons on it and all. I also have a pause menu shich pops out when I press ENTER (for now). Finally, I have a widget that appears when you collect a marble in the level.

For my pipeline, I made 3 animations for the Collectible HUD:

  1. When you got marble, it comes down and goes up after 2 seconds

  2. When you press ENTER (Pause), it comes down and stops

  3. When Pause is removed from viewport, the HUD goes back up (not working)

All of them separately work very well, but the problem is this:

When I call the Pause menu Widget, I want to call the Collectible Widget too. It works fine, as I call the 2 of them in the Character Blueprint when the input is pressed.

alt text

Here is the 2 functions I call, which are similar:

Pause Menu: alt text

Collectible HUD alt text

But when I press the Resume button, which is making the pause menu leaving the viewport, I try to trigger the animation of the Collectible HUD going back up and hide OFF screen, but it stays in screen.

This is the pause screen, called as I want...but the thing at the top doesn't go up after Pause is gone. alt text

This is the Pause Widget (top) and the Collectibles widget (Bottom): alt text

My question, finally, would be 3 questions:

  1. Is it possible that my event in Pause is just checking one time all the nodes and it is the cause of the bug (because when the pause menu is closed, it doesn't trigger an event begin play)? In that case, is there an event that can check multiples times the blue print so it can detect when the game is unpaused?

  2. Is there a way to call an event in a widget blue print, and make that event's following nodes in another widget blueprint? (I tried with casting...but it doesn't work between widgets (or is it?)) It would allow me to call an event when Pause is started and when Pause is finished, so i could start from these events in my collectibles blue print.

  3. If you think my way is bad and you have any good idea to make this working, I can take it :P

thanks for your patience. I hope to hear from you soon guys!

Product Version: Not Selected
06.jpg (645.3 kB)
01.jpg (48.7 kB)
02.jpg (76.8 kB)
03.jpg (89.6 kB)
04.jpg (93.3 kB)
more ▼

asked Nov 10 '14 at 07:54 AM in Blueprint Scripting

avatar image

1 1 1 4

avatar image DBouchard Nov 10 '14 at 05:33 PM

Nobody has an idea? Sorry for my persistence...I am just worried about a project I work on and which needs this...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Just looking at your graphs, Your Hide Marbles animation is never called because the pause boolean is never false along that branch of the original if statement and on both the true AND false branches of the original if statement, you have the animation show marbles called. I don't actually see anything in the graphs you have listed here that would cause it to execute on unpause.

Personally, I would take all the animations and put them in events with event dispatchers, and simply call the event dispatcher when you want them to fire. So, something like:

A) Create animate to screen event (with Dispatcher) B) Create animate off screen event (with Dispatcher) C) Create Keypress Event that checks the pause Bool, if unpaused, call event A & Set Bool to true. If paused, call event B and set value to false. D) In your UMG widget, take the bind function of your Resume button and call Event C via event dispatcher.

If you need an example, let me know, I can probably hack something together.

more ▼

answered Nov 10 '14 at 06:42 PM

avatar image

699 44 28 68

avatar image DBouchard Nov 10 '14 at 08:59 PM

I managed to do it by creating a home made event tick, as shown in the next picture (with a little help from a classmate). I share it as people can see it.

alt text

It allows me to check, while the collectibles widget is opened, many times if the game is paused and it works fine now!

Thanks RAVaught for your answer tough! It will surely help me in future works with UMG! (I upvoted you! Thanks)

08.jpg (151.2 kB)
avatar image RAVaught Nov 10 '14 at 09:15 PM

I'm glad you got it working! Looking at your new graph though, I have a question for you. Why do you have the Hide Marble animation looped back into the delay node?

avatar image DBouchard Nov 11 '14 at 04:31 AM

Hahaha well, I didn't even think about it when I put it back in the delay. I sure could take it off, you're right!


(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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