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. 

Widget text won't update?

I create a sort of clock timer for my game using a widget blueprint. I've got a 3 digit time (2:15 for example) with AM or PM following. The digits all update and display properly, but I for some reason the AM/PM does not. In fact it doesn't even display.

alt text

If I remove the binding from the AM text, then it displays as it should, but with the binding, nothing is displayed. The "Time of Day" variable I created inside my game mode blueprint is set to AM by default but it still doesn't display a value. Can't figure out what I've missed. Aside from the fact that all the digits are integers and the AM or PM is text, there's no difference between them.

Product Version: UE 4.10
more ▼

asked Sep 06 '16 at 06:55 AM in Blueprint Scripting

avatar image

1.2k 83 116 145

avatar image TorQueMoD Sep 06 '16 at 09:27 AM

Ok, so this is strange... I rethought the entire timer that I had made to see if there was something I missed. I deleted everything and came up with a different approach to making the time progress using a timeline instead of Event Tick. After re-designing, the AM/PM switch was still not happening.

Then I decided to delete the default value of the text variable and manually set the default value when the timer is activated (i.e. with a "Set" node) and THIS fixed the problem. So for whatever reason setting a default value for a text variable doesn't seem to work. I'm using 4.10 so this may have been fixed already. When I'm able to upgrade the engine again, I'll be sure to test it out and see if the problem still persists in the latest engine version.

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

1 answer: sort voted first

Displaying text need string var, not text var, if i'm right ... Try to convert it before set maybe ? (All my texts are displayed with strings and localization works because of "Make literal Text" -> Text to String)

more ▼

answered Sep 06 '16 at 07:15 AM

avatar image

830 31 12 38

avatar image TorQueMoD Sep 06 '16 at 09:32 AM

Well the Widget converts whatever you input into a text parameter anyway which is why I decided to use a Text variable instead of a string. If you look at my screenshot above, you'll see that there's no conversion happening when I feed the Time of Day text into the return node. Unless there's something I don't understand about Text variables, it should work directly.

avatar image mdonge Sep 06 '16 at 09:48 AM

You can try to bind the text label to a string variable instead of a function, and set this var just after your "Time of Day" var ... This is how I do and it works fine (if your new BP is close to the one posted !)

avatar image TorQueMoD Sep 06 '16 at 10:51 AM

Well like I said, I actually got the text variable to work by setting the value inside the event graph rather than in the default value of the variable itself. For whatever reason this fixed the issue so as I said if it still persists when I nuke my OS in another 2 months (after the release of my game) then I'll report it as a bug. It's likely fixed though in 10.13

Thanks for the help though mdonge!

(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