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"

Set an actor from interface into a widget

Hi,

Im trying to set an actor in a variable into a widget from an interface call. The variable returns nothing. alt text alt text

Is there a problem to send a message to a widget? Im doing the same to a BP and it works.

Thanks.

Product Version: UE 4.15
Tags:
1.png (108.7 kB)
2.png (72.7 kB)
more ▼

asked Mar 22 '17 at 04:51 PM in Blueprint Scripting

avatar image

Josemcasasp
5 1 2 5

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

2 answers: sort voted first

You need a reference to your widget to call an interface on it. At the moment you are calling the interface on the hit actor.

Interfaces don't work in the same as Event dispatchers - they need a target.

Try this:

alt text

If you have a number of widgets on screen that you want to set the actor in, replace the Get with as ForEach, but if there's just one, this will work. That will work on any Widget that is a child of UserWidget

widget.png (70.1 kB)
more ▼

answered Mar 22 '17 at 05:12 PM

avatar image

Mosel3y
1.8k 49 22 67

avatar image Josemcasasp Mar 22 '17 at 05:30 PM

The thing is i have the widget in a BP Actor because i want to do personal menu for each customize actor.

alt text

3.png (263.2 kB)
avatar image Mosel3y Mar 22 '17 at 05:36 PM

Ah, Is there only one actor with a widget in your scene at any time?

avatar image Josemcasasp Mar 22 '17 at 06:21 PM

No, im doing a VR house with customizable elements so i have many more BP actors.

avatar image Mosel3y Mar 22 '17 at 09:17 PM

In this case the below should work:

Leave the trace as you had it before, and the Widget blueprint as they were before, but in the customizable elements, in each Blueprint do this:

alt text

g.png (65.5 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

No, im doing a VR house with customizable elements so i have many more BP actors.

more ▼

answered Mar 22 '17 at 05:58 PM

avatar image

Josemcasasp
5 1 2 5

(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