Download

Widget Blueprint Text Content Binding Function Not Setting bool

I was trying to make a simple NPC chat system.
It would be nice to have the chat to randomly choose one response between three possible chat text lines when interacting.
unfortunately, the dialog updates and displays all three possible answers one after another and I only want it to display one answer every interaction.
here is what i have forced together sofar, let me know if there is a simple way to make this work.

Because NpcSpokeIO is local variable.

UMG Binding(here Get_npc_text_Txt_0) called frequently. So chat text changed randomly everytime called.

Assign random integer variable when F pressed(or Widget Constructed in you case) and use this inside binding function.

Variable can exposed on spawn.

Thanks got it working
I also figured out you need to cast to Name_Of the blueprint your changing variables on.
https://forums.unrealengine.com/deve…ject-reference