My TEXT Macro & Printed Lines

I put the welcome message and user input request in the same PrintLine function, and I have it skip a line (\n\n) instead of just starting a new line directly underneath.

#include “BullCowCartridge.h”

void UBullCowCartridge::BeginPlay() // When the game starts

{

Super::BeginPlay();

PrintLine (TEXT ("WELCOME TO THE BULLCOW GAME!!!\n\nType anything and press ENTER"));

}

void UBullCowCartridge::OnInput(const FString& Input) // When the player hits enter

{

ClearScreen();

FString HiddenWord = TEXT ("solar");
1 Like

Looking good! :+1:

I had to try this. I know absolutely little about macros and so wasn’t sure if adding an escape sequence such as ‘/n’ in the middle of an FString TEXT would work. Well, was I mistaken. Thanks for sharing. My brain wasn’t thinking like that…glad you posted.

Privacy & Terms