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
Alright it's time to get started on UI audio
And we are once again going to use the Fabulous
Kenny
4-hour audio effects
So I'm downloading the UI audio
Asset pack
From kenney.nl
I've also attack
Zip file containing all of these sounds as a resource to this lesson
So go ahead and download that from wherever you see
How much you got the downloaded extract
Go ahead and open up that folder
And open up the audio folder in there
Now what were you looking for it we looking for a sound
Decking
The hour button click sound
And we got a lot of switches in here
We got a lot of
I think we'll just go ahead and stick with the clicks here but feel free to use
Any other set of sounds that you prefer
I'm going to use the Calypso in a going to drag those on over to the file system
And then I will select all those and put those in the assets audio directory
Like so
So it got a clicks
Subtitled by online-courses.club We compress knowledge for you!
Now here's a Prayer
Where to play the click whenever a button is pressed and where we have buttons well
For now we have buttons
In our
End screen
Right we've got these two
But we've also got our upgrade card
Which we might use a a different sound for
But in the future we're gonna have
Other
Buttons for like our main menu in our options menu which are going to be building later
So
We need a button that will play a sound when we
And if we're just using the stand-alone button nose
We're going to have to write code for that
Single time
So what I'm going to do as I'm going to create a new scene
And the new scene is going to have a root type of other node
But
And said that as the root and then I'm going to call this sound
I'm gonna go ahead and see that inseam
You have
Sound button
So using a button as a route which means that it will have all of the same properties and signals as a normal
What we can do as we can add
Random stream player to it
And I want to play a sound on
We can I use the random stream player to die
Like so
Because again this is going to be sort of separated from the world doesn't make sense
To use a 2D button for a UI element that is always going to be in the same spot
On screen
So what we're going to do actually is going to create a new scene
Of type other now
And make it a type of audio stream player
And just call this
Random
Audio stream player
And you can get rid of the audio
If you prefer to match the other
Name of a random stream player to die
And I'm going to add a component at the end
Random stream
Component and then we'll save that in our scenes
Component Direct
The nice thing about
Is that I'm just going to go
Open up my random stream player to decompose
And I'm going to open up the script and
Highlight everything with ctrl a
And press ctrl c to copy
I'm going to bring that back over 2
Are random stream player component
Add a new script create
And
Hit ctrl h
Highlight everything in here
And paste that code
And the only thing we need to change is extends right
Extends
Needs to extend audio stream player
Ok and
Then we can select a root node
A random stream player component
And let's set the bus to SFX down here
So that every time we use
GSF
It is unfortunate that we have to
Copy and paste this code
The audio stream player 2D inherit from node to the
And the audio stream player in here it's from
Note
And so because there was inherit from different branches
It becomes really hard to you reuse the code
Because they don't have a base type
In common except for
Note so you could write extends node if you wanted to
But then you lose all of the
Properties that you can set here and there's a work around for that as well
It's just easier in this instance
Not ideal
But it's easier to just copy and paste the code
And
Make them set
Scripts instead of trying to share
It's got a random stream player company
Let's go back to a sound
Here and let's go ahead
And instantiated a child seen underneath
And make that a random
Stream player component
Like so
And then I'm going to add a script to our sound button here
I'm going to
Create
And all we need to do is on already
We just need to connect to the press signal so we can save
Dart
Connect
Press
Song on Prayer
And we are going to reference the random stream player component
Play underscore random
It's really that simple r button has a press
Which will inmates when the button is clicked
And if you're unsure again you can look at the new tab here to look at all the signal
That are available to you
And now we just need a drop in
Our sounds into the stream sorry
So highlight all the click sounds
Shift and click
And and Dragons on over
Under the streams are a
And there's always room
Dunno what I'm going to do is I'm going to switch to the 2D mode here
And I'm just going to write
Sometime
In my sound button here so I'm going to click the sound button
And the text is going to
Sound
Button
And then if I run the scene with this run current seen button
You can see that
That is playing a sound now a random sound every time I click
So that's
Let's go to our end screen
And in here we need to replace
These buttons with
That sound button
So what we need to do
2
Change LPS buttons ears will just have to do it manually solus institute of child theme
Let's do
Sound but
Let's duplicate that you can hit ctrl-d to duplicate and
Snow got to sound button
Call days restart button
And quit button old
And then what you can do with
Select the reset button
And then any inspector select this measured object property
Tool button here
Slide copier
Then select your first sound button
Click that button again that Tobin
And in peace the properties
And that will transfer all the same properties from
Original restart button to a new restart button
And then do the same for the quit
So I'm going to sleep the quick
Click the tool button
Can't be proper
I like the sound button to
Click that button again
And Pace the properties there
Then we can rename this to
Restart button
Quit button
And we can highlight bosleys with control
Right
Access as unique
And then we can delete our all the time
By hitting delete after selecting them
And then
Ok so now we run that seem
You are here
When you
The button
Now the problem is dead
You may not hear it
Because work instantly changing
The scene or quitting the game
And we will address that
Later
But rest assured that
Your buttons are working and we tested and
In the sound button here
Ok
The next step is to come up with some sounds for our upgrade cards
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.