How to display hud for x time beginning of the level

I am trying to make on screen instructions with the hud based on a certain level in c++. Currently I am checking which level I am on which determines what the hud will display. However, I only want the text to appear on the screen for x amount of seconds.

In MyHud.cpp

//Get the screen dimensions
FVector2D ScreenDimensions = FVector2D(Canvas->SizeX, Canvas->SizeY);

//Call to the parent versions of DrawHUD
Super::DrawHUD();
if (GetWorld()->GetMapName() == TEXT("UEDPIE_0_Office"))
{
	FVector2D StringSize;
	GetTextSize(TEXT("Use W A S D to move around"), StringSize.X, StringSize.Y, HudFont);
	DrawText(TEXT("Use W A S D to move around"), FColor::White, 50, 50, HudFont);
}

However this will obviously have the text appear on the screen until the game changes levels. How can I make only display for a few seconds before moving onto the next text or displaying nothing?

Well, HUD is a subclass of Actor, and it is set up to tick as any other actor. You could add either a counter or a timer to your hud class and check whether enough time has passed.

E.g.

YourHUD.h

UPROPERTY()
float TimeSinceLevelStart = 0.0f;
UPROPERTY()
float HelpMessageDisplayTime = 5.0f;
UPROPERTY()
bool DisplayHelpMessage = true;

// Override Tick
virtual void Tick(float DeltaTime) override;

YourHUD.cpp

void YourHUD::Tick(float DeltaTime)
{
        Super::Tick(DeltaTime);

        if(DisplayHelpMessage)
        {
                    TimeSinceLevelStart += DeltaTime;
                    if(TimeSinceLevelStart > HelpMessageDisplayTime)
                    {
                            DisplayHelpMessage = false;
                    }
        }
}

void YourHUD::DrawHUD()
{
	Super::DrawHUD();

	if(DisplayHelpMessage)
        {
                // Help message
        }
	
}

Just what I needed! Thanks a ton and helping me get through this learning curve.