WIDGET TEXT IS NOT SHOWNED

Hello ev! :upside_down_face:

I was setting up my timer widget’s variables, the media texture I made is working properly in game, but the text box (remaining time) is not showing/updating its current value in game. In the event graph, the print string is correct, so i’m thinking that the problem might be in the widget script.




What Am I missing? What Am I doing wrong? Suggestions?

Thank y’all so much!

This is not how you display or update the timer in a text block. There are multiple things wrong with the blueprint and your first screenshot is not really readable.

Try this instead:


(use TextBlock instead of EditableText, MyPlayer is the MedaiPlayer variable - WT1_ref in your BP)

1 Like

Set timer function wrong!!!.

You should not rebind the event to the function .
Because your timer have (Loop=true)
Dont create 1.000.000 event
And You need isvalid before (photo1)in array->get(0)

But there’s “isvalid” node already, and is not an infinite loop on true, because each time the variable decrease, and the branch is true until the variable is greater than 0. The bind is to prevent media plays before the widget is added to the viewport. @jetboy_hrn1990

like for example? explain please

And also, why are you using media player seconds?

@dZh0 I kept my code, I just changed the type of text box, before I used “editable”, now I’m using the static one you suggested, and it works as is. Also, another problem was the Zorder being too low.

Thanks!? haha
If you could help me understand the differences between those text boxes and what else you thought was wrong in the code, I would really appreciate it anyway!

like for example? explain please

Well first you don’t need the timer at all - you have access to the elapsed time. Second even if you don’t it’s bad to convert text to number increment and then convert back. It’s better to keep the time as a number and convert only one way when needed for display. Thirdly It is bad practice to use the number converted from a text field as a condition for your mechanic (when to stop) even if you ignore the fact that the player has an event when a video is completed.

And also, why are you using media player seconds

You were counting seconds with your code and I didn’t want to complicate the graph unnecessarily.

If you could help me understand the differences between those text boxes

Editable text is a field that you want your player to fill like entering their name for example.

1 Like

Clear! :ok_hand:
Nothing about the rest?
Anyway.. thank you so much! :slight_smile:
@dZh0

Ye, infact Im doing it once now.

but i’m using the timer counter to 0 to set “endgame”, i don’t understand what’s wrong, do you think there are cleaner and more efficient ways to do the same?

What you mean? Im a bit confused. Are you talking about the “set timer by event” or my widget? :woozy_face:

@dZh0

but i’m using the timer counter to 0 to set “endgame”, i don’t understand what’s wrong, do you think there are cleaner and more efficient ways to do the same?

The float value here is coming form a UI interface text converted to float that is used as a condition to end your game mode. Avoid relaying on your interface to control your game unless it is a direct player input (like quitting the game) Your application should be playable and running without any UI.

What you mean? Im a bit confused. Are you talking about the “set timer by event” or my widget?

You don’t need “set timer by event” at all - you can always get the time from your player. With this timer you are just counting seconds in a very complex manner.