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"

Reading variables of spawned actor and passing those to other BPs with EventDispatcher not running

Hi there,

can someone help me out with reading variables from a spawned actor and making them available to a few BPs?

current setup: I am spawning actors on my map. Via raycast on one of those actors, an Interface is called which runs a function on the selected actor reading its variables and passing these via custom event to another BP. Player controller raycast on actor > Actor starts function and calls custom event > 3rd BP starts event with variables

what I am trying to achieve: pass the variables via event dispatcher or another solution to many BPs. I can't get it running for a few days now and I don't know what I doing wrong. Is it even possible to bind events to spawned actor classes? I don't know what to put into the target at "bind event".

/edit added screens. 1. InterfaceCall in BP1 2. Function Return and EventDispatcher Call in BP2 3. bind event in bp3

the last one is with a cast (where I don't know what to put in Object). Tried it without as well.


Function Return and EventDispatcher Call


Product Version: UE 4.15
1.png (41.0 kB)
2.png (56.6 kB)
3.png (74.5 kB)
more ▼

asked May 22 '17 at 07:12 PM in Blueprint Scripting

avatar image

24 2 4 9

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

1 answer: sort voted first

Create your dispatcher in gamestate, then in you bp classes use GetGameState() -> BindTo(). Then call this dispatcher wherever you want.

more ▼

answered May 23 '17 at 11:57 AM

avatar image

630 12 14 52

avatar image MeMe May 24 '17 at 11:28 AM

Thanks for taking your time to reply. It is running now after I did what you said. After ReturnBoolean an CustomEvent is called via CastToGameState.

I am a bit confused now as I thought any BP could do what GameState does in this case. Guess I need to read it up again.

For others with this issue: You can't link GetGameState() directly into BindTo(). It needs a CastToGamestate.

avatar image Erumaru May 24 '17 at 11:41 AM

This is because you are using other gamestate class, not official. You have to cast to the custom gamestate you are using.

avatar image MeMe May 24 '17 at 11:48 AM

absolutely right. Is there a way to handle it with the default GameState?

avatar image Erumaru May 24 '17 at 11:52 AM

You can edit default one, but I don't think you want to do this.)

(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