Hi i got very simple game in UE4 which are guessing I make static mesh and added terminal to it so its showing now, when player runs out live it should end i got it like
void UBullCowCartridge::BeginPlay() // When the game starts
{
Super::BeginPlay();
PrintLine(TEXT("DEV: Slovo je: "));
PrintLine(TEXT("Riskuj"));
PrintLine(TEXT("Budes hadat slovo"));
PrintLine(TEXT("Mas 5 zivotu slovo je ISOGram (pismenka ve"));
PrintLine(TEXT("slove se neopakuji)"));
PrintLine(TEXT("pokud nejake pismeno bude dobre pricte se ti byk pokud nejake spatne pricte se ti"));
PrintLine(TEXT("krava"));
PrintLine(TEXT("Zacnes psat pomoci TAB tlacitka."));
HiddenWord = TEXT("Svoboda");
}
void UBullCowCartridge::OnInput(const FString& Input) // When the player hits enter
{
ClearScreen();
if(Input == HiddenWord)
{
PrintLine(TEXT("You win!"));
} else {
PrintLine(TEXT("You lose"));
--live;
}
if(live == 0) {
end();
}
}
Aucun commentaire:
Enregistrer un commentaire