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"

How can I add this?

I have in my level blueprint (first blueprint picture) nodes for calculating z distance, which is the score. I SET the score at the end of the blueprint.

I have in my widget blueprint (event graph) some nodes but I need to connect my score to the "My Character" and ToText(Int) --- so the score node has to have two connections on it.

How can I implement my calculated score from the first pic, level blueprint, into my widget blueprint??

I want to have the score in my widget blueprint so that I can update the widget text box.

alt text

alt text

Product Version: UE 4.9
Tags:
aaa.png (227.4 kB)
aaaaaa.png (178.7 kB)
more ▼

asked Oct 26 '15 at 10:19 PM in Blueprint Scripting

avatar image

nmm131
170 47 49 60

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

1 answer: sort voted first

store a variable for the widget once created and added to viewport. use your code to SET the text box variable, which you can access as a pin you can drag off the widget variable in the level blueprint

or follow this: https://docs.unrealengine.com/latest/INT/Engine/UMG/UserGuide/PropertyBinding/index.html

more ▼

answered Oct 27 '15 at 03:03 AM

avatar image

MrGrr
991 34 3 41

avatar image nmm131 Oct 27 '15 at 04:18 PM

How can I bring my TargetPoint into this to connect to the getActorLocation?

Or how can I set that x,y,z coordinate of the target point to a new vector, to connect to the getActorLocation.

With this I removed my targetPoint from the level blueprint because I can just accomplish this inside the widget event graph...but somehow I need a targetPoint or vector.

alt text

untitled.png (245.5 kB)
avatar image MrGrr Oct 27 '15 at 11:30 PM

This is a bad idea - perform this as per normal on your regular blueprint, and ONLY send the results to the widget.

Widgets should only be used for display.

avatar image nmm131 Oct 28 '15 at 01:29 AM

alt text

How can I send this result to the widget? I cannot drag in the score variable.

Check this error message:

alt text

64277-aaa.png (227.4 kB)
untitled.png (226.5 kB)
avatar image MrGrr Oct 28 '15 at 01:40 AM

where you run the code, cast to "your widget name here", drag off the result pin, and SET "insert name of your widget variable here"

avatar image nmm131 Oct 28 '15 at 01:50 AM

In the widget event graph I hit an error when I only have Score -> Return Node (both are purple)

avatar image MrGrr Oct 28 '15 at 01:57 AM

Remove that. if you are casting to the value inside the widget directly from the other blueprint, you dont need the binding. I may however need to send you a screenshot when i finish work.

avatar image nmm131 Oct 28 '15 at 03:57 PM

Yeah when there is nothing inside the widget event graph besides score and return node, I get an error.

(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