I tried to add a dialogue system in my game and it works pretty well but there is a problem. Every time I change the line the character is supposed to say it just spawns a new widget with just that line.
The code:
I put a ‘Do once’ node on the things I want to happen only at the beginning of the dialogue but it does it every time regardless of the ‘Do once’ node. If you need any further info just ask me. Thanks in advance.
Hey there @DeiankataTV! So your system is actually designed in a way to create a new widget every time. If you wanted to instead have a widget that changes text you would spawn one at the beginning of your interaction, and then just set the text on it every time you want to change lines. As of now your Add Dialogue Widget area just makes a new one. You could take that, fire that once and first, then take that reference, and pass the lines to it. Then when done, you unparent the old widget and it’ll be garbage collected.