Only showing interact UI if NPC has something to say
Posted: Fri May 05, 2023 4:11 am
Hi!
I have an interaction UI that pops up when near to anything with my Interactable script. I'm having trouble making the interact UI only show near NPCs if they have valid entries in their dialogue conversation, and to not show up even if in range if there aren't any entries that can be shown. The conversations are started from a Dialogue System Trigger that each NPC has, so there could be an easy way to reference each NPC's own conversation from there.
Ideally I would prefer doing this in script, because my dialogue entries already have a lot of quest state conditions to keep track of in the Conversation Editor. Thanks in advance!
I have an interaction UI that pops up when near to anything with my Interactable script. I'm having trouble making the interact UI only show near NPCs if they have valid entries in their dialogue conversation, and to not show up even if in range if there aren't any entries that can be shown. The conversations are started from a Dialogue System Trigger that each NPC has, so there could be an easy way to reference each NPC's own conversation from there.
Ideally I would prefer doing this in script, because my dialogue entries already have a lot of quest state conditions to keep track of in the Conversation Editor. Thanks in advance!