HELP! Communication between Widget and BP?
Hey there! I'm having some trouble trying to get something in movement.
I have a widget that i'm using as screen for a phone I have on the scene. The widget and the phone are different objects. I want to bind some text and a progress bar to some variables on the phone. In a similar scenario I used the Cast to but it doesn't work (Accesed none trying to read property K2Node_DynamicCast_AsSmartphone_BP from function: 'Get_FirstHour_Text_0' from node: Return Node in graph: Get_FirstHour_Text_0 in object: ScreenWidget with description: Accessed None trying to read property K2Node_DynamicCast_AsSmartphone_BP)
This are the variables:
First I would create a Blueprint that contains both your phone and your widget. Then you can create a variable that let you access your widget:
While you can bind your widget variables to your BP, this is not the most efficient method to do so. I would recommend that you create a macro that is Names SetHealthBarValue, and what it does is set your HealthBar variable value, then it will access the widget and change the health bar, that way you only update your widget when the value changes, instead of every frame.
If you have a text variable in your widget but it doesn't seam to show up, make sure your text has this checkbox checked:
answered Sep 25 '16 at 08:45 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here