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 dispatch button press to level BP


I've made a widget blueprint (options-menu) with 3 buttons. The widget is added inside the level as an actor.

alt text

One of the buttons (menu-btn-3 Verrassing) from my widget calls a dispatcher setMaterialDispatch (which should change the material of the floor in the level).

alt text

In the level blueprint, I create an EventBeginPlay which I then want to bind to my dispatcher (setMaterialDispatch) and then connect the dispatchter binding to an event. However, my event is not triggered. I've spend hours looking at tutorials and articles but it doesn't trigger the event in my level blueprint. It does work when, in my level blueprint, I add it to the viewport and set the mouse cursor, then connect it to the BindEvent to setMaterialDispatch. But since I bind it to the Viewport, I get a menu on top of my level which I don't need (since my menu is inside the level, mapped to an actor). I want to click/press the button (Verrassing) directly inside the level. If I however remove the nodes of the AddtoViewport and the set (Mouse cursor) and directly bind it to the dispatcher, it doesn't work anymore.

Ideally, this is what I think should work but it doesn't work:

alt text

Can somebody help me please? Thanks in advance for your support!

Product Version: UE 4.14
more ▼

asked Mar 05 '17 at 12:00 PM in Blueprint Scripting

avatar image

62 9 10 18

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

1 answer: sort voted first

The widget you are creating in the Level Blueprint with CreateWidget there, is not the same one that already exist in your scene, as in, they are two separate actors. It needs a reference to the correct actor to bind the event.

Instead, create a reference to the 3D widget in your level blueprint, by clicking it in the scene, opening your level blueprint, right clicking in the graph and picking "Create a Reference to [your actor]".

Then do the below:

alt text

widget.jpg (267.6 kB)
more ▼

answered Mar 07 '17 at 01:11 PM

avatar image

1.8k 49 22 67

avatar image Superfunkstar Mar 07 '17 at 07:12 PM

Hi Mosel3y,

thank you soooooo much for your solution. It works! I followed your clear instructions and suddenly the material of my floor changed. Really great! :-)

It's the first time I had to ask the community for help and it got answered so fast. WOW.

Good luck with your Unreal projects and again, many thanks.

(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