how can i load a value when i open a widget ? there is no event begin play on widget fonction.
i want to call a variable of my character for set a temporary value who can be change when the widget is open and don’t save the value in my character if the widget is close or no apply bouton press.
And when i reopen the widget, i wand to load again the character variable.
My widget bp work exepte i need to set the temporary value in the widget.
If i use event focus that work but all the values are reload if i don’t click on a widget button. and event construct dont load the values.
Hello,
If you can’t set your value on event construct, you can create a custom event in your widget event graph where you set your value and call it from “return value” or variable reference when you “create widget” or “add viewport”.
I can’t be sure as i don’t see your blueprint graph but trouble can be the reference. It can be the need of “enable input” node before doing your event too.
You use a “get player character” to “cast to your controller”. You have to “get player controller” to have it working (Check that you’ve set your controller in your game mode too.)