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
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
Russian
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
Let's create a defeat screen or a you died a screen
With the same or similar functionality
Has the Victory
And we're actually going to use the same underlying c
And so
We're going to go ahead and just make it configure
I'm going to go ahead and open up with ctrl shift all the victory screen
And this is going to need to be renamed
So I'm going to go out and do that
I'm gonna search for Victory
Screen in my file system here
I'm going to right click
On the scene
Rename
2
End screen
Instead
Not going to rename the Script file as well
So right click rename
Record is end screen as well
And before you go any further I'm going to run the game and make sure that it's still working as expected
Perfect
Which change this
Victory screen name to end screen
And then let's go ahead and open up our aurena time manager
Subtitled by online-courses.club We compress knowledge for you!
Let's open up at script
Add let's rename this variable
We're going to say rename this victory screen seem to end screen scene
And would change Victory Here in on timer timeout
And here is
Ok so now we've renamed our variable to end screen everywhere
We're going to need to reset
This and screen seen here
In the arena time manager seem so select the root node
I just tried over your end screen into the
Exported variable there
Let's go back door and screen seen and open up the Script
And we just need to set
2
Just basically be reskinned for the defeat case
So let's go out and create a function in here
Functions set defeat
And in here what we need to do is we need to change the value of Evil
So I'm going to rename his labels over here
Recall this title label
Add a second one to
Description label
But I like both of those by holding ctrl and click and boat
Right-click
Then select axis is unique name
And then in our said defeat funk
Let's do dollar sign
Percent
Title label
Dot text
Is equal to
Defeat
In quotes just like so
And then same dollar sign percent
Description label
That text is equal to
You'll
Ok so we need to now show this screen when the player dies
So I'm going to go to my main
In our main doesn't
Have a script on the route now I'm going to go ahead and do that so I'm gonna click the new script button
Create ad script
Song
Ready so I can override that ready method
And in my entities
I'm going to go here and I'm going to right click
The player
And access is unique name as well
What we're going to do
Is we're going to do this
Dollar sign percent player
Now we have the players health compare
Traits of a open up my player script
We have a variable health component here in the player
So if I go back to my main script
I can actually reference that health compare
That means that I can connect to
The tides
So I can
Health components
Dartconnect
On
Play Adele
That function on player died
Ellis my past for now
Because we need to create an export variable appear
For the
So tight end
Screen
Scene
And that sometime Tupac
Seemed
What's click on our main
Root note up here
LS drag over that and screen again into that variable
So that's it
When the player dies we're going to do the same thing you're going to say
Bar and
Stream instance
Is equal to
And screen
Scene
Instantiate
We're going to say add child
Screen
That should basically be it
Go back to my Arena time manager
We already know that this works so I'm going to change the wait time back to 60 seconds
Which we will definitely be increasing for the Fog
Let's go Henry clip play
And see
If we
I did that message when we die
Victory ok so
This is working
We just didn't call the set defeat meth
So let's go ahead and do that in our main script here
And we're just going to say
Aldi egg chair
And screen insta
Start
Set
Ok and is very
We cannot call the set David before it is in the sea
Tree
And
That some generally true
When you're trying to manipulate or get information about
The scene tree
So in our end screen
If I go down the screen
You see that word referencing
Knows that exist in the scene
And a lot of times you'll find that
Just doesn't quite work
Or if you rely on something
Initializing the radio
It's not going to quite work
Unless you are the same
To The Scene 3
And when you add scenes to the same tree at runtime
The ready method essentially gets called in between these two lines Lines 12 and 13 here
So if I call and child and screen instance
That ready method is going to be cold
As part of this and Child
So that means that anything that runs in the ready method for this end screen will be available by the time I run this line
So you have to be a little bit careful about your order of operations if you're getting strange errors
I would double check that you're not trying to do anything scene tree related
With
You're seeing that you're instantiate
Until it's been
There is some stuff you can do before it's been added to the same tree
But you have to be very careful about
What you're trying to do
It's all for good measure let's just give this another shop
We don't really need a test the buttons to make sure that they were
I'm pretty sure that they are going to work cos we tested that with the
Victory screen
I got you last and I'm just gonna rage quit
Alright so we've got a victory and defeat screen in place
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.