void AEscapeBallGameMode::Tick(float DeltaSeconds) { // Add time to the total Time totalGameTime += DeltaSeconds; FTimespan timeFormatter = FTimespan(0, 0, 0, FMath::Floor(totalGameTime), FMath::Floor(FMath::Fmod(totalGameTime, 1.0f)*1000.0f)); totalGameTimeString = timeFormatter.ToString(); // Check if player has touched the goal. UWorld* worldRef = GetWorld(); //ADestinationGoal* goalRef = Cast<ADestinationGoal>(goal); if (goal && goal->isTriggered()) { //GEngine->AddOnScreenDebugMessage(-1, 0.1f, FColor::Yellow, TEXT("Reached Goal")); UGameplayStatics::OpenLevel(GWorld, "LevelEditorQuickStartGuide", false, ""); } }