Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Now, just for testing purposes, I'm going to go back into my script and we're a private float damage
amount zero point five.
Just going to lower this down to like zero point one.
And well, actually, maybe zero point two.
OK.
And then if I save this and I just play through this to ensure that I get up to maybe level two or three.
Shoot Copley's zombies, make sure that they don't tempt me.
And this way, I'll definitely get up to level two.
And we got on level two now.
So it all starts again.
This time I'm going to let them kill me.
Here we go.
OK, Gameover, return to my menu, I go up to level two, I play again.
Notice I'm still on level two.
OK, that's because it's never getting reset.
You'll also notice that the time is actually frozen as well.
So what we need to do, basically, we need to reset things.
So and one of the reasons why time is post is because if game over is equal to true.
Let's take a look.
We're set in time to time.
Scale equals zero.
Now, even though the script may restart, this is an internal function.
Unless you return it back to time.
That time scale equals one.
It will never go back to one.
OK.
So in a menu script, we want to ensure that we are setting it to.
We are setting time back to one.
So I'm simply going to say time to time scale equals one.
So return back to normal.
Say that we also need another public static
of this in Gameover.
Simply call this public static off type bowl called game, and it is equal to false to begin with.
Now, the reason why I'm making it public static so that that will persist no matter how many levels
you answer if you're on level five or still.
No, your game has not ended yet.
But as soon as the game is ended.
It's fine that function check for Gameover.
If that's the case, then we're going to say.
That's gain and that equals truth.
All right, so now it basically recognizes that the game is over.
We also need to ensure that we're changing the level number as well.
Now we're going to do that if game end is equal to false.
We're going to do that in the start.
OK.
Sorry if game ended is equal to true.
We're going to change that in the start.
So I'll leave all of that going up to here.
And I'll say if game ended is equal to true should be equals.
Equals, by the way.
And in that case, we're going to set our at level number to one, and we're going to say game and that
equals false again so that we can begin again.
All right.
So almost like resetting it if you want.
So make sure that's done in the start.
That will then reset that static ball so we can start again.
But if game ended is if if game over is true, that is set to true.
You go back to your main menu still and it's still in the memory.
You play the game and basically it has to run the start again whereby it finds that you your game didn't
find its true.
It's going to reset it back to level one and reset that game ended, but false.
Let's just double check it to make sure that that's the case.
So once again, I'm going to make sure that I survive level one.
Shooting a couple of zombies.
Obviously, it's a lot faster on the phone because you can use to hunt.
You could even have a system whereby you actually gain points for killing each of these just quite easy
to do.
So let's just make sure that they can actually kill me on this level.
There we go.
All right, Gameover, we're on level to return to main menu and press play.
We're still on level two.
So the reason why as an update is because I have not told it to date, and I'll explain why.
So on the start, we've actually called the level text out text equals level plus level number two string
and then only change level number one down here.
So you have to be careful on the ordering.
So if I do control X on there, just below the application target frame rate to control V, I'm calling
it before that command now.
So that should now read level one.
All right.
And feel free to test it out.
You don't want to see me go through that again, but be very careful where you run your commands.
All right.
Because they do run in order.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.