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"

Event Dispatcher not firing event

In my game I created an ActorComponent to store and handle player abilities. Whenever an ability is added (or removed) an event dispatcher is called to signal, that the abilities have changed (see screenshot) Event Dispatcher Call

In my ability menu widget I bound a custom event to the event dispatcher, so the UI knows when to update itself, without using any ticks (see screenshot). Event Dispatcher Receive Call

Whenever I call the function on the blueprint everything runs and the dispatcher is called (confirmed that already). However: The UI does not receive the call, even though it is bound before the AddAbility function runs. Now, when I do the same in the PlayerCharacter blueprint, the call is received and the custom event called.

Where is the problem in my setup? What did I miss, or is this a bug?

Product Version: UE 4.12
more ▼

asked Jul 04 '16 at 06:59 PM in Blueprint Scripting

avatar image

18 2 5 7

avatar image A-NASR Jan 20 '18 at 08:32 AM

Its too old but i have the same issue. Did you manage to do it ? Have this issue on both 4.17 and 4.18

avatar image Trynn Jan 20 '18 at 09:51 PM

I posted an answer that might help you.

avatar image Ruhrpottpatiot Feb 11 '18 at 04:37 PM

Check if you are calling the event from the server. That was my problem.

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

1 answer: sort voted first

I believe I know what the problem is. For the OP, his cast to the player state blueprint is failing. So in other words, the flow of execution stops at that point. It never reaches the bind event. I can see more wrong with that original picture than what I just mentioned, but that's beyond what matters at this point. I'm not entirely sure why he was trying use the player state for that logic but even when I made a custom game mode and set it to use my custom player state, the cast still fails. I would suggest in that context to use the player character for that particular logic.

First create the event dispatcher inside the player character and then make sure that you use the player character blueprint as the target for the event dispatcher binding. Any event dispatcher target has to be a reference of the blueprint where that binding is created. That is one of the other problems I noticed with the op's logic.

Aside from that, if you cast to the current player character bp that you use in your game the cast will never fail and will see that the bind event works.

I included a couple screenshots of some logic I put together to show how event dispatchers are supposed to be used.

alt text alt text alt text

If there is still confusion or if it seems like I may have misunderstood the questions here, please let me know.

more ▼

answered Jan 20 '18 at 09:55 AM

avatar image

56 2 5 7

avatar image Ruhrpottpatiot Feb 11 '18 at 04:36 PM

The reason for the event not firing had nothing to do with the cast failing (which, in my case didn't). The real reason was a improper RPC setup. The event was called from the server, and since the UI isn't available on (dedicated) servers it never got to the UI.

avatar image NicoNieto Apr 23 '19 at 07:35 PM

I have this problem too. What do you think is the best way to fix that ?

(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