[Request] AddText() to TextBlock and Auto Scroll

I’m creating a Text Game and I would like the ability to add text to a text block instead of just replace all text in the block with Set Text. I want to use this for certain events that should not be erased, such as a person saying something or a monster walking into the room. It would also be nice if there was an option for the Scrollbar to automatically scroll to the bottom of a TextBlock so that as new text is added you can see the latest events. Basically, something that works like a chat window.

Well, I kind of found a workaround for the time being. For adding text to a TextBlock I put all my events into a TArray of FText. Each time a new event occurs I call an AddEvent() function. This event loops through the array and converts them all to FStrings while concatenating them to a single FString variable. I then convert that variable back to an FText and set the text of the TextBlock.

 void ATextGameGameMode::AddEvent(FText t) {
      // limits the amount of total events that can be seen before they disappear
      if (events.Num() > 300) {
           events.RemoveAt(0, 1, false);
      }
      events.Add(t);
      FString ce = "";
      for (int32 i = 0; i < events.Num(); i++) {
           ce += events[i].ToString();
      }
      currentEvents = FText::FromString(ce);
      UpdateEvents();
 }

UpdateEvents() is a BlueprintImplementableEvent that sets the contents of currentEvents into the TextBlock.

The scrolling issue is partly solved in blueprints by setting the Scroll Offset to a ridiculously large number and calling it whenever a new event is added. The problem is that it will eventually scroll too far and new events will not be able to catch up with the Scroll Offset and thus be hidden at the top. If you don’t set Scroll Offset high enough, it will eventually stop and new events will be hidden at the bottom.