Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,256 --> 00:00:01,792
The game is in
2
00:00:02,048 --> 00:00:06,656
Good shape or at least better shape than it was but we're still missing one big thing in
3
00:00:07,168 --> 00:00:07,936
Is sound effects
4
00:00:08,448 --> 00:00:11,520
Salt we're going to get started on the sound effects and it's probably going to take
5
00:00:11,776 --> 00:00:14,080
A couple of lessons to get everything in place
6
00:00:14,592 --> 00:00:18,176
And I'll just noticed before we start that it is very difficult
7
00:00:18,432 --> 00:00:18,944
Define
8
00:00:19,200 --> 00:00:19,968
Asset
9
00:00:20,224 --> 00:00:22,272
Four sounds that are properly licenced
10
00:00:22,784 --> 00:00:25,088
Such that I can distribute them to
11
00:00:25,600 --> 00:00:29,696
So I'm going to do the best that I can with the assets I can find
12
00:00:29,952 --> 00:00:33,536
But please note that if you want to make the
13
00:00:33,792 --> 00:00:34,304
Sounds
14
00:00:34,560 --> 00:00:36,352
A little bit nicer a little bit better
15
00:00:36,608 --> 00:00:40,448
I would encourage you to go sitting outside and effects online on your own
16
00:00:40,960 --> 00:00:41,984
And plug goes in
17
00:00:42,240 --> 00:00:43,776
Where you see fit
18
00:00:44,032 --> 00:00:47,616
I'll show you the basics of how you can implement sounds in the engine
19
00:00:47,872 --> 00:00:48,896
And then you can
20
00:00:49,408 --> 00:00:50,944
Change out the sounds as you
21
00:00:51,712 --> 00:00:55,040
So the sound effects pack that were going to be working with is from Kenny
22
00:00:55,296 --> 00:00:57,856
Same as the art assets that were using
23
00:00:59,136 --> 00:00:59,648
Kenny
24
00:00:59,904 --> 00:01:01,933
Houses that are nice because they are typically public domain
25
00:01:01,935 --> 00:01:04,284
Subtitled by
online-courses.club
We compress knowledge for you!
26
00:01:04,284 --> 00:01:08,864
Which is the reason why I can just take those files and redistribute them to you
27
00:01:09,376 --> 00:01:13,472
Hall without even necessarily giving out of the ocean so these are public domain
28
00:01:13,728 --> 00:01:17,568
Which means that you can use them for whatever purpose that you want including commercial purpose
29
00:01:18,080 --> 00:01:19,616
And we're going to be downloading
30
00:01:19,872 --> 00:01:20,896
Impact sound
31
00:01:21,152 --> 00:01:21,664
Affect
32
00:01:21,920 --> 00:01:22,944
From the app
33
00:01:23,456 --> 00:01:23,968
Avatar
34
00:01:24,224 --> 00:01:27,552
The zip file as a resource to this lesson so
35
00:01:27,808 --> 00:01:29,088
You can just download it from there
36
00:01:29,344 --> 00:01:34,464
But I encourage you to go to kenny's website and just check out all of the things that are available for you
37
00:01:34,976 --> 00:01:36,512
Someone's you've downloaded Dad
38
00:01:36,768 --> 00:01:38,560
Impact sounds in
39
00:01:38,816 --> 00:01:40,096
Go ahead and
40
00:01:40,352 --> 00:01:41,376
Extracted to
41
00:01:41,632 --> 00:01:42,912
A folder of your choice
42
00:01:43,424 --> 00:01:46,240
And when I gave you putting all of the sounds in our
43
00:01:46,496 --> 00:01:47,520
Game directory
44
00:01:47,776 --> 00:01:50,080
Only going to include the sounds that were actually going
45
00:01:50,592 --> 00:01:53,664
And the first set of sounds that were going to grab
46
00:01:53,920 --> 00:01:56,224
Are these footstep carpet sound
47
00:01:56,736 --> 00:02:00,832
Now we're not going to use the sound effects for footsteps rather we're going to use them for
48
00:02:01,088 --> 00:02:03,904
Impacts with enemies someone that enemies good head
49
00:02:04,160 --> 00:02:04,928
I'm going to play
50
00:02:05,440 --> 00:02:07,488
This is because it sounds nice and Chunky
51
00:02:07,744 --> 00:02:11,840
And I think it'll work well so go ahead and just select all of the foot step carpet sounds here
52
00:02:12,096 --> 00:02:12,864
Selfie
53
00:02:13,120 --> 00:02:15,680
Carpet drag Oliver's over into the file system
54
00:02:15,936 --> 00:02:17,216
Sound now we have
55
00:02:17,472 --> 00:02:18,240
Audio
56
00:02:18,496 --> 00:02:19,008
Tiles
57
00:02:19,520 --> 00:02:22,848
How many create a new folder in the assets directory here
58
00:02:23,104 --> 00:02:26,432
So new folder and where can I call this audio
59
00:02:27,712 --> 00:02:32,064
And I hadn't just drag all of those footsteps sounds into the audio director
60
00:02:32,576 --> 00:02:35,648
Alright so the basically that we play sound effects is like
61
00:02:35,904 --> 00:02:37,952
I'm going to go ahead and go to my
62
00:02:38,464 --> 00:02:38,976
Enemy
63
00:02:39,488 --> 00:02:40,768
My basic anime scene
64
00:02:41,536 --> 00:02:42,304
Open it
65
00:02:42,560 --> 00:02:46,144
And I can add at the following so I can add a
66
00:02:46,400 --> 00:02:47,936
Audio stream player
67
00:02:48,448 --> 00:02:50,752
And we're going to use an audio stream player to die
68
00:02:52,288 --> 00:02:57,664
The way that you play Sounds is with these audiostream playing out so there's an audio stream player to die
69
00:02:57,920 --> 00:03:00,224
And is also in audio stream player
70
00:03:00,736 --> 00:03:04,320
In the big difference between these is that the audio stream player to die
71
00:03:04,576 --> 00:03:05,600
Will change
72
00:03:05,856 --> 00:03:08,160
Volume depending on the distance
73
00:03:08,416 --> 00:03:09,952
From the centre of the camera
74
00:03:10,208 --> 00:03:13,792
So since this is a 2D no they can have a position in world space
75
00:03:14,048 --> 00:03:18,656
An opposition will be used to determine the volume fall off of The Sound of
76
00:03:19,168 --> 00:03:22,240
We will use the audio stream player for a couple of things but
77
00:03:22,496 --> 00:03:24,800
We're going to give the audio stream player to die for now
78
00:03:25,056 --> 00:03:25,568
And
79
00:03:25,824 --> 00:03:27,872
What you can do in the Austrian player today
80
00:03:28,128 --> 00:03:33,248
Is you can supply a stream so I'm just going to go ahead and drag over the footstep carp
81
00:03:33,504 --> 00:03:34,528
Boujee
82
00:03:35,040 --> 00:03:36,064
What's the carpet 0
83
00:03:36,576 --> 00:03:40,672
And we can change the volume in here and we can change the max distance
84
00:03:40,928 --> 00:03:43,488
I'm going to turn the max distance to something like
85
00:03:44,768 --> 00:03:46,304
Because our
86
00:03:46,816 --> 00:03:49,632
Our game is not very big in terms of pixel count so
87
00:03:49,888 --> 00:03:56,032
We don't want to leave it at 2000 because you probably won't even hear a difference between a sound as far away and a sound
88
00:03:56,288 --> 00:03:59,616
Close so really is 300 that's going to be a little bit better
89
00:03:59,872 --> 00:04:02,176
And then the attenuation that's the curve
90
00:04:02,432 --> 00:04:02,944
4
91
00:04:03,456 --> 00:04:05,248
Loudest sound Falls
92
00:04:05,760 --> 00:04:08,832
So similar to our animation I can make the sound
93
00:04:09,088 --> 00:04:09,600
Loud
94
00:04:09,856 --> 00:04:12,416
For some of the distance and then drop off faster
95
00:04:12,672 --> 00:04:14,208
Or I can make the drop
96
00:04:15,488 --> 00:04:19,583
The default is linear so you can right click this by the way and select one of these
97
00:04:19,839 --> 00:04:21,119
Curves if you want
98
00:04:21,375 --> 00:04:23,423
I'm just gonna leave it at Leonardo because that
99
00:04:23,679 --> 00:04:24,959
Default works just
100
00:04:25,471 --> 00:04:29,567
Ok and those were the main settings we have AutoPlay and player
101
00:04:30,335 --> 00:04:31,871
If you turn on playing your hair
102
00:04:32,127 --> 00:04:32,639
Through the Edit
103
00:04:33,407 --> 00:04:37,759
And AutoPlay just means that it will play as soon as it enters the Scene 3
104
00:04:38,271 --> 00:04:41,087
In the last important setting is the bus
105
00:04:41,343 --> 00:04:43,391
Now let's take a look at bus
106
00:04:43,903 --> 00:04:44,415
So
107
00:04:44,671 --> 00:04:45,439
I'm going to go to
108
00:04:45,695 --> 00:04:47,743
To the audio tab at the bottom here
109
00:04:47,999 --> 00:04:50,047
And these are our buses
110
00:04:50,559 --> 00:04:52,863
And we already have a master bus by The Fall
111
00:04:54,143 --> 00:04:59,007
What is a bus a bus is essentially a place where all the audio film
112
00:04:59,775 --> 00:05:03,359
So by the fog all of the audio flush through the master bus
113
00:05:03,615 --> 00:05:08,991
And in the bus I can change the volume so I can change the master volume of my game
114
00:05:09,247 --> 00:05:11,807
I bringing this DB value down
115
00:05:12,063 --> 00:05:14,111
And that would make my game over all quiet
116
00:05:14,623 --> 00:05:17,439
I can also add various effects and that would have
117
00:05:17,695 --> 00:05:19,743
Every single sound going through
118
00:05:20,255 --> 00:05:21,279
The bus
119
00:05:21,535 --> 00:05:23,327
Buses are pretty power
120
00:05:23,839 --> 00:05:26,655
And what we can do if we can do ad bus
121
00:05:26,911 --> 00:05:28,191
To create a noob
122
00:05:29,471 --> 00:05:31,519
We can name this bus how's everyone
123
00:05:31,775 --> 00:05:34,079
And also apply individual
124
00:05:34,335 --> 00:05:35,103
Affect
125
00:05:35,359 --> 00:05:36,383
Here as well
126
00:05:36,639 --> 00:05:38,687
And then at the bottom of our bus
127
00:05:38,943 --> 00:05:41,247
We can select which bus it connects
128
00:05:41,503 --> 00:05:42,015
2
129
00:05:42,271 --> 00:05:44,063
So if we only have 2 buses
130
00:05:44,319 --> 00:05:46,367
It's going to connect to the master but so that means
131
00:05:46,623 --> 00:05:48,671
After a sound flows through this
132
00:05:49,183 --> 00:05:49,951
It's going to be pi
133
00:05:50,207 --> 00:05:54,559
Into the master bus and then have all the master effects and volume
134
00:05:55,583 --> 00:05:56,351
As well
135
00:05:56,607 --> 00:05:58,143
So it's basically like a chain
136
00:05:59,423 --> 00:06:01,727
Settings or effects to apply
137
00:06:01,983 --> 00:06:03,007
2
138
00:06:03,519 --> 00:06:06,079
So actually going to have two bosses here less Creed 2
139
00:06:06,335 --> 00:06:07,615
Create one
140
00:06:07,871 --> 00:06:09,407
The first bus let's call
141
00:06:09,919 --> 00:06:10,687
SFX
142
00:06:10,943 --> 00:06:12,479
And the second bus was called new
143
00:06:13,247 --> 00:06:15,551
And he's are both gonna pipe into mass
144
00:06:15,807 --> 00:06:18,111
So these are going to be independent of each other
145
00:06:18,367 --> 00:06:19,647
I could for example
146
00:06:19,903 --> 00:06:21,183
Set the music
147
00:06:21,439 --> 00:06:24,255
What's the pipe into the SFX but I don't want that to happen
148
00:06:24,511 --> 00:06:26,815
Why because we're going to be able to have
149
00:06:27,071 --> 00:06:28,095
With this setup
150
00:06:28,351 --> 00:06:31,679
Two different volume sliders for sound effects in army
151
00:06:32,191 --> 00:06:36,543
That means that we can allow the user to change the volume of the music and the volume of the SFX
152
00:06:36,799 --> 00:06:37,311
Separate
153
00:06:37,823 --> 00:06:41,919
So what does configured let's go back to our audio stream player in arm
154
00:06:42,943 --> 00:06:43,455
And
155
00:06:43,711 --> 00:06:45,759
Which change the bus to SF
156
00:06:46,271 --> 00:06:49,343
So now there's audio stream player is going to play that sound
157
00:06:49,599 --> 00:06:51,135
Through that SFX bus
158
00:06:51,391 --> 00:06:54,719
Ok so that's a basic overview of the set-up
159
00:06:54,975 --> 00:06:57,023
I actually get the sound to play wow
160
00:06:57,535 --> 00:06:59,071
In my basic
161
00:06:59,583 --> 00:07:01,375
I want to play the sound if I
162
00:07:01,887 --> 00:07:02,399
Hit
163
00:07:03,423 --> 00:07:03,935
Turn
164
00:07:04,191 --> 00:07:06,751
I'm going to hide the audio panel by clicking
165
00:07:07,007 --> 00:07:08,287
The audio but not the bar
166
00:07:08,799 --> 00:07:10,335
And we don't really have a wee
167
00:07:10,591 --> 00:07:11,615
Detecting if
168
00:07:11,871 --> 00:07:12,639
Vienna
169
00:07:12,895 --> 00:07:14,943
Is hips I'm going to open up their heart box
170
00:07:15,199 --> 00:07:15,711
Component
171
00:07:15,967 --> 00:07:16,991
Script by Claire
172
00:07:17,247 --> 00:07:17,759
I'm in here
173
00:07:18,015 --> 00:07:22,623
And but we could do is we could just connect to the area entered signal
174
00:07:22,879 --> 00:07:24,415
All this hurt Buxton point
175
00:07:24,671 --> 00:07:27,487
But we have a couple of texts in here which means that
176
00:07:27,743 --> 00:07:30,047
The hitman and Her being registered
177
00:07:30,303 --> 00:07:30,815
So
178
00:07:31,071 --> 00:07:34,911
I'm actually going to create a new signal in the heart box component at the top
179
00:07:35,167 --> 00:07:36,959
I'm going to call it signal
180
00:07:37,471 --> 00:07:37,983
Get
181
00:07:38,239 --> 00:07:39,007
Just like so
182
00:07:40,031 --> 00:07:42,079
And at the end of the on area entered funk
183
00:07:42,335 --> 00:07:43,359
I'm going to do it
184
00:07:46,175 --> 00:07:47,711
That hit singer
185
00:07:48,223 --> 00:07:49,759
And now on my face again meow
186
00:07:50,015 --> 00:07:51,039
Open up that's
187
00:07:51,551 --> 00:07:54,367
In my base Academy I can override a ready method
188
00:07:55,647 --> 00:07:56,415
I don't I can say
189
00:07:56,671 --> 00:07:58,463
Hurt box component
190
00:07:58,719 --> 00:07:59,999
It that connects
191
00:08:00,767 --> 00:08:01,279
On
192
00:08:01,535 --> 00:08:02,047
Hit
193
00:08:02,815 --> 00:08:04,863
And then I'm going to create that function on here
194
00:08:05,887 --> 00:08:08,703
Then I'm going to play the audio stream playlist
195
00:08:08,959 --> 00:08:10,751
Dolla sign audio stream player to
196
00:08:11,263 --> 00:08:12,031
Start play
197
00:08:12,799 --> 00:08:14,335
And so now for play the game
198
00:08:14,591 --> 00:08:16,639
I should hear that sound every time
199
00:08:16,895 --> 00:08:17,663
The enemy gets here
200
00:08:21,247 --> 00:08:21,759
Scenario
201
00:08:22,271 --> 00:08:23,039
So that's bass
202
00:08:23,551 --> 00:08:25,599
Set up for sound effects now
203
00:08:25,855 --> 00:08:27,391
We have a number of 4
204
00:08:27,647 --> 00:08:28,415
Carpet sounds
205
00:08:28,671 --> 00:08:30,463
And we want to play
206
00:08:30,719 --> 00:08:31,231
Anyone
207
00:08:31,487 --> 00:08:31,999
Please write
208
00:08:32,255 --> 00:08:33,023
But how do we do there
209
00:08:33,279 --> 00:08:35,583
Set the audio stream Player only
210
00:08:35,839 --> 00:08:37,375
Support for onestream
211
00:08:37,631 --> 00:08:40,191
We have a couple of options we can create
212
00:08:40,447 --> 00:08:46,591
In audio stream player 2D for each sound and then randomly play it so that we get variation in the sound
213
00:08:47,615 --> 00:08:50,175
Or we can create something like a component
214
00:08:50,687 --> 00:08:51,455
To handle
215
00:08:51,967 --> 00:08:52,479
That
216
00:08:52,991 --> 00:08:53,503
For us
217
00:08:53,759 --> 00:08:57,087
And I think we're going to create a component so let's Create
218
00:08:57,599 --> 00:08:58,367
Can you sing
219
00:08:58,623 --> 00:08:59,647
With controller
220
00:09:00,159 --> 00:09:01,951
What's my favourite type of
221
00:09:02,463 --> 00:09:03,231
Audio
222
00:09:03,999 --> 00:09:05,023
Stream player to
223
00:09:06,303 --> 00:09:08,351
I'm going to collect random stream player
224
00:09:08,607 --> 00:09:10,655
2D component just to be
225
00:09:10,911 --> 00:09:14,239
Consistent with our naming so random stream player to decompose
226
00:09:14,495 --> 00:09:16,031
I know the dad's very long
227
00:09:16,287 --> 00:09:20,127
But will work with it and I'm going to save it and seems
228
00:09:20,383 --> 00:09:21,151
And save it
229
00:09:21,407 --> 00:09:23,967
Let's go headlight out of script that as well
230
00:09:25,247 --> 00:09:25,759
Ok
231
00:09:26,015 --> 00:09:27,807
So let's do this first let
232
00:09:28,063 --> 00:09:28,831
Export
233
00:09:30,623 --> 00:09:33,183
Stream array so will call it streams
234
00:09:33,439 --> 00:09:35,487
And that's going to be an array of type
235
00:09:35,999 --> 00:09:37,023
Audio stream
236
00:09:40,095 --> 00:09:40,863
Just like so
237
00:09:41,375 --> 00:09:42,911
And then we're going to create
238
00:09:43,167 --> 00:09:44,447
A function called
239
00:09:44,959 --> 00:09:46,495
Play underscore
240
00:09:48,031 --> 00:09:49,823
And then a clear and we can save our
241
00:09:50,079 --> 00:09:53,919
Chosen underscore stream is equal to streams
242
00:09:54,175 --> 00:09:54,687
Pick a random
243
00:09:56,735 --> 00:10:00,844
And let's begin some safety here to water at it's so if our streams
244
00:10:00,845 --> 00:10:03,016
Subtitled by
online-courses.club
We compress knowledge for you!
245
00:10:03,018 --> 00:10:02,879
Is equal to null
246
00:10:03,135 --> 00:10:03,903
Or
247
00:10:04,415 --> 00:10:06,207
Streams.se
248
00:10:06,975 --> 00:10:08,767
Is equal to 0
249
00:10:09,279 --> 00:10:10,303
Somebody's going to return
250
00:10:11,071 --> 00:10:12,095
So there is nothing that
251
00:10:12,607 --> 00:10:17,215
Ok if we pass that check our chosen stream is going to be equal to streams
252
00:10:17,471 --> 00:10:17,983
Picrew
253
00:10:18,495 --> 00:10:20,799
And then we have this property here
254
00:10:21,055 --> 00:10:22,079
Which is Coldstream
255
00:10:22,335 --> 00:10:23,615
And so we can simply say
256
00:10:23,871 --> 00:10:24,383
Stream
257
00:10:24,895 --> 00:10:25,407
Equal
258
00:10:25,663 --> 00:10:26,431
Chosen stream
259
00:10:26,943 --> 00:10:30,527
And we can even simplify this by just simply doing stream up here
260
00:10:31,039 --> 00:10:32,063
And getting rid of that
261
00:10:33,599 --> 00:10:35,647
Ok so what we doing is essentially going to
262
00:10:35,903 --> 00:10:39,231
How to pass in an array of strings now and then when we call play round
263
00:10:39,487 --> 00:10:41,023
It will pick one of them in plays
264
00:10:41,535 --> 00:10:43,583
So let's see how we can use this
265
00:10:43,839 --> 00:10:44,351
Cracked
266
00:10:44,863 --> 00:10:46,399
And before we go any further
267
00:10:46,655 --> 00:10:50,751
Let's change the default BIOS on Acer random stream player 2D component 2SF
268
00:10:51,519 --> 00:10:53,823
And if we do that then we won't have to keep changing
269
00:10:54,335 --> 00:10:55,103
Everytime we use
270
00:10:55,871 --> 00:10:59,455
Let's go back to the basic enemy and what I'm going to do is I'm going to
271
00:10:59,711 --> 00:11:00,991
I'm going to Institute
272
00:11:01,503 --> 00:11:04,575
That random audio stream player 2D component
273
00:11:04,831 --> 00:11:08,671
And then I'm going to go back to my audio stream player to die in my base Academy
274
00:11:09,183 --> 00:11:10,719
I'm gonna click the tour button down
275
00:11:11,231 --> 00:11:13,791
So clip that I'm going to collect copyproperties
276
00:11:14,047 --> 00:11:15,839
I'm going to pierce those properties
277
00:11:16,351 --> 00:11:18,399
Into the random stream player to die
278
00:11:18,655 --> 00:11:19,935
So peaceful strawberries
279
00:11:20,191 --> 00:11:22,239
And that will carry over our mass
280
00:11:22,495 --> 00:11:23,519
Max distance
281
00:11:24,031 --> 00:11:24,799
And H
282
00:11:26,335 --> 00:11:28,383
Stream which we don't actually need so weak
283
00:11:28,895 --> 00:11:30,175
Sunset dad stream
284
00:11:30,431 --> 00:11:32,223
Alastair Levy audio stream player to
285
00:11:32,991 --> 00:11:35,039
Now got a random stream player to
286
00:11:35,295 --> 00:11:35,807
Component
287
00:11:36,063 --> 00:11:38,111
And let's fall in the streams
288
00:11:38,623 --> 00:11:39,391
Bye
289
00:11:39,647 --> 00:11:42,463
Clicking on the first footstep carpet holding she
290
00:11:42,719 --> 00:11:43,743
I'm clicking on the last
291
00:11:43,999 --> 00:11:46,815
And Dragon all of those onto the streams are a
292
00:11:47,071 --> 00:11:49,631
And then if you click into it you can see we have 5 streams here
293
00:11:50,655 --> 00:11:52,703
So with that streams are raised
294
00:11:53,215 --> 00:11:54,751
Now in our
295
00:11:55,007 --> 00:11:56,799
I hid function in the
296
00:11:57,055 --> 00:11:58,591
Academy we can call
297
00:11:59,871 --> 00:12:01,919
Stream player will do dollar sign
298
00:12:02,175 --> 00:12:04,479
Random stream player 2D component
299
00:12:04,735 --> 00:12:06,527
Dart player underscore
300
00:12:08,319 --> 00:12:13,695
Alright so now let's go ahead and Run the game and what we should find is that the sound is slightly different every time
301
00:12:15,999 --> 00:12:20,351
And that actually isn't working and it's because forgot one very simple thing
302
00:12:20,607 --> 00:12:24,447
Resetting the stream here in our random stream player to decompose
303
00:12:24,703 --> 00:12:27,263
Script but we never playing it so we just need to call
304
00:12:27,519 --> 00:12:28,031
Play
305
00:12:28,799 --> 00:12:31,359
I'll get some now let's go ahead and give you a shout
306
00:12:34,687 --> 00:12:35,199
Ok
307
00:12:35,455 --> 00:12:39,039
So you're not a problem here so it is playing different sounds every time
308
00:12:39,551 --> 00:12:40,063
But
309
00:12:40,319 --> 00:12:44,415
It's not playing a sound when the enemy dies and the reason for that
310
00:12:44,927 --> 00:12:45,695
Is because
311
00:12:45,951 --> 00:12:50,303
Our enemy is actually being freed from the scene which means so is the audio stream player
312
00:12:50,559 --> 00:12:52,351
And that means that
313
00:12:52,863 --> 00:12:54,143
There's no no
314
00:12:54,399 --> 00:12:54,911
Play the song
315
00:12:55,423 --> 00:12:57,727
So there's wonder easy way that we can
316
00:12:57,983 --> 00:12:59,519
Used to fix that
317
00:12:59,775 --> 00:13:00,799
And that is
318
00:13:01,311 --> 00:13:03,359
I'm just going to copy this note
319
00:13:03,615 --> 00:13:04,895
And paste it into the door
320
00:13:05,151 --> 00:13:05,663
Compound
321
00:13:05,919 --> 00:13:06,431
So
322
00:13:06,687 --> 00:13:08,479
Rename this too
323
00:13:08,735 --> 00:13:10,015
Butts ringing Estate
324
00:13:10,271 --> 00:13:11,039
Audio
325
00:13:11,295 --> 00:13:11,807
Claire
326
00:13:12,831 --> 00:13:16,159
And I know what kind of breaking her naming convention here by the hit audio player
327
00:13:17,183 --> 00:13:19,231
Or we can call hit random
328
00:13:19,487 --> 00:13:20,255
Audio player
329
00:13:20,767 --> 00:13:22,303
Just a little bit more script
330
00:13:22,815 --> 00:13:26,911
And then I'm going to press ctrl-c to copy that or you can right click and copy
331
00:13:27,167 --> 00:13:27,679
From
332
00:13:28,191 --> 00:13:28,959
The menu here
333
00:13:29,215 --> 00:13:33,823
I'm going to go into my dad's component by clicking this button does open in Edinburgh
334
00:13:34,335 --> 00:13:35,615
And then I'm going to paste
335
00:13:35,871 --> 00:13:36,383
In there
336
00:13:37,151 --> 00:13:39,199
Alright and then my death composed
337
00:13:39,455 --> 00:13:40,991
I'm going to open up that's crap
338
00:13:41,247 --> 00:13:43,295
And I am going to call
339
00:13:43,551 --> 00:13:45,087
In the on died function here
340
00:13:45,599 --> 00:13:46,367
I'm going to call
341
00:13:46,879 --> 00:13:49,695
Hit random audio player from coin.pl
342
00:13:50,207 --> 00:13:50,719
Random
343
00:13:51,999 --> 00:13:53,791
So that will solve that problem
344
00:13:54,047 --> 00:13:54,559
Now
345
00:13:54,815 --> 00:14:00,447
This is only really going to work if we use the same hitsounds for every enemy which I believe they were going to do
346
00:14:00,703 --> 00:14:04,287
If you want to use different it sounds then you have to devise a different cyst
347
00:14:04,543 --> 00:14:06,335
To play the correct sound when they die
348
00:14:06,847 --> 00:14:07,359
It is you
349
00:14:08,895 --> 00:14:15,039
So we got a basic enemy I'm going to move this hip random audio player component up just underneath the death component
350
00:14:15,295 --> 00:14:17,599
Consistency in the let's go ahead and see if
351
00:14:17,855 --> 00:14:18,367
Fixed
352
00:14:19,135 --> 00:14:20,415
Am I getting an error
353
00:14:20,671 --> 00:14:22,975
Because we do not rename this
354
00:14:23,231 --> 00:14:23,999
Reference
355
00:14:24,255 --> 00:14:27,583
So in the morning hit function of our basic enemy we need to call this
356
00:14:28,607 --> 00:14:29,119
Hit
357
00:14:29,887 --> 00:14:30,655
Random
358
00:14:30,911 --> 00:14:32,959
Audio player component likes
359
00:14:33,471 --> 00:14:35,007
Ok let's see if that works now
360
00:14:39,103 --> 00:14:40,895
That's working pretty well
361
00:14:41,151 --> 00:14:45,247
And then let's just go ahead in copy that hit random audio player component
362
00:14:45,503 --> 00:14:46,015
Control
363
00:14:46,527 --> 00:14:47,551
Drum and bass Academy
364
00:14:47,807 --> 00:14:49,599
The let's open up our wizard and
365
00:14:49,855 --> 00:14:51,647
Let's go ahead and paste that in
366
00:14:51,903 --> 00:14:52,671
Ctrl-v
367
00:14:52,927 --> 00:14:54,719
Move that up below the desk and
368
00:14:55,231 --> 00:14:57,023
And we need to do the same thing with this
369
00:14:57,279 --> 00:14:58,303
Open up the wizard
370
00:14:58,559 --> 00:14:59,071
Script
371
00:15:01,375 --> 00:15:03,423
Let's override the already here
372
00:15:03,679 --> 00:15:05,471
And we're going to say
373
00:15:05,983 --> 00:15:07,775
Hurtbox component.of
374
00:15:08,031 --> 00:15:08,799
Connect
375
00:15:09,823 --> 00:15:10,591
On here
376
00:15:12,895 --> 00:15:16,991
And then we're going to create that on hid function down here and we're going to say hit
377
00:15:17,503 --> 00:15:20,063
Random audio player component
378
00:15:20,575 --> 00:15:21,087
Play
379
00:15:21,343 --> 00:15:21,855
Ran
380
00:15:22,879 --> 00:15:24,159
Alright son now and then
381
00:15:24,415 --> 00:15:26,207
Spawn that should work just
382
00:15:26,719 --> 00:15:28,511
And yet the wizards are
383
00:15:28,767 --> 00:15:31,071
Receiving damage when they get hit so that's great
384
00:15:31,327 --> 00:15:36,191
That was introduction to sound effects will continue on in the next lesson
385
00:15:36,447 --> 00:15:38,239
Where's building out more of the sun
26486
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.