How to get next available line rather than a specific line?


I’m making a multiple response dialogue system, and the way I have it set up now is to assign a String to each line with a For Each Loop off of an Array. I want it so that sometimes the character will need to do something before a line of dialogue unlocks. This means sometimes there will be a hole between response choices. The problem is that the way I have it set up now, each line of dialogue goes to a specific spot on the dialogue widget. I would like to work a bit differently, where each line goes to the next available line, rather than to a specific line, since locked lines will not be available until they are unlocked. What would “next available” logic look like in Blueprints?

Does for example each 4 line get displayed on 4 different box dialogue or 4 line represent a paragraph on a single dialogue box ?,

Some possible solution:

  • add some special char in your line like /, you will then detect a / at the first char of a line variable and can mean lock. When you want to unlock it you just remove the /.(you will need to cast to string)

  • make use of IDs dialogue from a data table, each npc will have some sort of array IDs story progression, with these IDs display the related dialogue line. (or something similar)