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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How can I change the text within my widget blueprint via a variable from another actor blueprint?

What I'm trying to accomplish I have an actor in my game and when you scroll your mouse over this actor a 3D widget pops up (widget is a component of the actor) with the name that you set for the actor. I have it set so someone can input the items name via an exposed variable within the editor.

What my problem is I cant send an editable text string variable from the actor blueprint to the widget blue print and have the widget text be changed. I have read over every forum post I could find and still have not found an answer. People seem to have success but I cant understand what they did differently. I'm sure the error is on my end

How I have it set up The 3D widget component (located on the main actor) is getting its blue print data from a widget blueprint. On this widget blue print I have set a variable binding for the widget text so the text can be changed. No matter what I do I cant get the two blue prints to communicate the text variable. I try casting to my Actor blue print from my widget blue print but I always get "the type of object is undetermined error." I'm not sure what I should hook in here and everything I try does not work. alt text

Any insight would be appreciated.

Product Version: UE 4.10
Tags:
widget bp error.png (167.5 kB)
more ▼

asked Mar 26 '16 at 10:41 PM in Blueprint Scripting

avatar image

Mr Janks
28 3 6 11

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

3 answers: sort voted first

Hi, This problem has been open since Mar 16. In case you haven't found a solution yet or for anyone else who needs a solution, you might try the following.

I faced a similar situation, and with inputs of Nick Jackson's reply managed to fix the problem. A big thank you to Nick for this.

In the actor blueprint (in your case I assume it is 3DWidgetRollOver) get a reference to your widget component whose widget class parameter you have set to the 3D Widget. Then drag out a pin from the reference to "Get User Widget Component" node. then drag out a link from the Return Value of the "Get User Widget Component" to your "Cast to Object_Select_BP" node. This should provide it with the reference it needs.

Just for info I am using UE4 4.12.3.

alt text

widgetcompref.png (64.7 kB)
more ▼

answered Jul 23 '16 at 06:10 AM

avatar image

Vedicdynamics
36 2

avatar image drag00nkkk Jul 28 '16 at 07:05 AM

GJ! It really works! Thanx a lot :)

avatar image tetrackis Dec 04 '17 at 03:11 AM

Thx a lot !!!@

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

You're talking about communicating from actor blueprint to widget blueprint. Setup a Custom Event on the Widget with an input parameter of whatever text you are trying to update. alt text

Then call this Custom Event from your Actor whenever you want. Make sure you setup a reference to it first:alt text

Then call it like you would any other Custom Event.

capture.png (63.1 kB)
capture2.png (120.5 kB)
more ▼

answered Apr 06 '16 at 01:44 PM

avatar image

Nick Jackson
492 17 14 107

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

There is a better way to do this without casting. Casting too often can cause performance issues.

https://answers.unrealengine.com/questions/580295/how-can-i-make-a-floating-health-bar-on-enemy.html

https://docs.unrealengine.com/en-US/Engine/UMG/QuickStart/index.html

While not exactly what is talked about, this works much better.

more ▼

answered Jun 19 '19 at 06:19 AM

avatar image

BonecrusherOEF
16 1 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