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:03,584
Let's continue by making a hip flash
2
00:00:03,840 --> 00:00:06,400
For our enemy so in addition to
3
00:00:06,656 --> 00:00:10,752
Showing the damage numbers when enemy hit were asking to flash the enemy
4
00:00:11,008 --> 00:00:12,032
82 very quickly this
5
00:00:12,288 --> 00:00:13,312
A very Common
6
00:00:13,568 --> 00:00:14,848
In games to convert
7
00:00:15,104 --> 00:00:15,872
The player that died
8
00:00:16,128 --> 00:00:16,896
Has been done
9
00:00:17,152 --> 00:00:17,664
To the
10
00:00:18,176 --> 00:00:19,712
And so yeah let's get ready
11
00:00:19,968 --> 00:00:21,760
We're going to take a component base
12
00:00:22,016 --> 00:00:22,784
Approach again
13
00:00:23,040 --> 00:00:24,064
Just let me have
14
00:00:24,320 --> 00:00:26,112
Reusable component that we can use
15
00:00:26,624 --> 00:00:28,928
Instead of duplicating code in
16
00:00:29,184 --> 00:00:29,696
French plaits
17
00:00:30,208 --> 00:00:31,232
Now it's all a trick
18
00:00:31,488 --> 00:00:33,280
And you'll see why it's tricky
19
00:00:33,536 --> 00:00:34,304
In
20
00:00:34,560 --> 00:00:35,072
Little
21
00:00:35,328 --> 00:00:35,840
But
22
00:00:36,096 --> 00:00:36,864
Here's one I'm going to
23
00:00:37,376 --> 00:00:39,168
Let's create a new
24
00:00:39,680 --> 00:00:40,192
Scene
25
00:00:40,448 --> 00:00:41,728
And give it a true type
26
00:00:41,984 --> 00:00:42,752
2D scene
27
00:00:43,008 --> 00:00:45,056
Let's call it a hip flask
28
00:00:45,824 --> 00:00:46,592
Composed
29
00:00:46,848 --> 00:00:47,360
Just like
30
00:00:47,616 --> 00:00:49,408
And then we can see that in SIA
31
00:00:50,176 --> 00:00:50,688
Component
32
00:00:51,968 --> 00:00:55,808
So we've got our hit flash components saved let's go ahead and create a screw
33
00:00:56,320 --> 00:00:57,600
With the default settings is fine
34
00:00:58,112 --> 00:01:00,141
Let's do an export variable
35
00:01:00,143 --> 00:01:02,747
Subtitled by
online-courses.club
We compress knowledge for you!
36
00:01:02,748 --> 00:01:02,720
What do we want to export we want to
37
00:01:02,976 --> 00:01:03,488
Westport
38
00:01:03,744 --> 00:01:08,352
A variable that represents the health components of lets.do export via health compare
39
00:01:08,864 --> 00:01:10,144
And that sort of type no
40
00:01:10,656 --> 00:01:14,240
Turn the lights to another one export
41
00:01:14,496 --> 00:01:15,008
Sprite
42
00:01:15,776 --> 00:01:16,544
And that will be
43
00:01:17,824 --> 00:01:18,848
Sprite 2D
44
00:01:19,104 --> 00:01:19,616
Just likes
45
00:01:19,872 --> 00:01:21,920
Ok so let's create a
46
00:01:22,176 --> 00:01:24,224
Ready method override
47
00:01:24,480 --> 00:01:27,296
Here and we're going to take this health compound
48
00:01:27,808 --> 00:01:31,392
And we are going to connect to the health changed
49
00:01:31,648 --> 00:01:32,416
Signal
50
00:01:32,672 --> 00:01:33,952
Health component
51
00:01:34,208 --> 00:01:34,976
Health check
52
00:01:35,488 --> 00:01:36,256
Dartconnect
53
00:01:36,768 --> 00:01:37,280
On
54
00:01:37,792 --> 00:01:38,304
Health
55
00:01:38,560 --> 00:01:39,072
Change
56
00:01:40,352 --> 00:01:41,888
Let's Create that function
57
00:01:42,144 --> 00:01:43,168
For honour
58
00:01:43,424 --> 00:01:43,936
Change
59
00:01:44,960 --> 00:01:45,728
I was just
60
00:01:45,984 --> 00:01:46,496
Passing
61
00:01:48,288 --> 00:01:51,360
Let's take a look at our health component by opening that
62
00:01:51,616 --> 00:01:53,920
NR health component here
63
00:01:54,176 --> 00:01:55,200
When it is midday
64
00:01:55,456 --> 00:01:56,480
Changed signal
65
00:01:56,736 --> 00:01:58,272
It doesn't have any r
66
00:01:58,784 --> 00:02:02,112
So we should be good with just a function with no arguments in our head
67
00:02:02,368 --> 00:02:03,392
Which component script
68
00:02:04,160 --> 00:02:05,952
Now this is where things get a little bit
69
00:02:06,464 --> 00:02:09,024
Before we go any further we need to write
70
00:02:09,536 --> 00:02:10,560
A shader
71
00:02:10,816 --> 00:02:13,376
And so I'm going to go to the 2D mode here
72
00:02:13,632 --> 00:02:15,168
In the Hitler's component
73
00:02:15,680 --> 00:02:17,728
I'm going to add each child node
74
00:02:17,984 --> 00:02:18,496
That is a
75
00:02:19,008 --> 00:02:21,056
Right now this is just going to be temporary
76
00:02:21,568 --> 00:02:24,128
So that we can see what we're doing when we write our sheet
77
00:02:24,384 --> 00:02:25,920
And I'm going to search
78
00:02:26,176 --> 00:02:30,272
You can use any spray that you want I'm just going to drag the wizard anime over
79
00:02:30,528 --> 00:02:31,040
The texture
80
00:02:31,296 --> 00:02:32,320
Just that we can have
81
00:02:33,088 --> 00:02:37,952
So select that Sprite 2D and scroll down all the way to the bottom until you see
82
00:02:38,208 --> 00:02:39,744
The material
83
00:02:40,768 --> 00:02:42,304
Click that drop down and then say
84
00:02:42,560 --> 00:02:43,840
New shader material
85
00:02:44,096 --> 00:02:44,864
And then
86
00:02:45,120 --> 00:02:46,144
Click into that
87
00:02:48,192 --> 00:02:49,472
There's a Shearer property here
88
00:02:49,984 --> 00:02:51,776
Quickly empty and click a new shed
89
00:02:52,288 --> 00:02:53,312
And this
90
00:02:53,568 --> 00:02:57,152
Should be fine you can create a different shaded directory if you were
91
00:02:58,176 --> 00:03:01,248
But I think we'll just leave it in the component directory that's fine
92
00:03:01,760 --> 00:03:02,272
For me
93
00:03:02,528 --> 00:03:03,296
So I'm going to create
94
00:03:04,320 --> 00:03:05,856
And then click Internet shirt
95
00:03:06,112 --> 00:03:06,624
2
96
00:03:07,136 --> 00:03:07,648
Open and
97
00:03:07,904 --> 00:03:13,536
Cancel this is our shader editor in Italy pre-populated with these lines and shaded white canvas item
98
00:03:13,792 --> 00:03:15,072
And void
99
00:03:15,584 --> 00:03:20,704
Cheetahs are one of those things that it's going to be impossible to describe them adequately
100
00:03:20,960 --> 00:03:22,240
In a single lesson
101
00:03:22,496 --> 00:03:23,264
These are
102
00:03:23,520 --> 00:03:25,568
Very complicated things that
103
00:03:25,824 --> 00:03:26,336
Kante
104
00:03:26,592 --> 00:03:28,128
Long time to get
105
00:03:28,384 --> 00:03:29,408
A grasp of
106
00:03:29,664 --> 00:03:30,688
Premier do my
107
00:03:30,944 --> 00:03:31,968
To get you interested
108
00:03:32,480 --> 00:03:33,248
The concept of
109
00:03:33,504 --> 00:03:34,016
Sheila
110
00:03:35,040 --> 00:03:36,320
Hopefully that can kick off
111
00:03:36,576 --> 00:03:38,368
Sam further learning for you
112
00:03:38,624 --> 00:03:42,720
So the Shield type of line here is just telling us what the type of the shaver
113
00:03:43,232 --> 00:03:46,048
For to the applications we want to use
114
00:03:46,304 --> 00:03:47,584
Which is what it is
115
00:03:48,096 --> 00:03:49,888
And then there's this void
116
00:03:50,144 --> 00:03:52,704
And this is a function that will be called
117
00:03:52,960 --> 00:03:54,496
On each pixel
118
00:03:54,752 --> 00:03:55,264
That
119
00:03:55,520 --> 00:03:56,800
Exists in the
120
00:03:57,312 --> 00:03:59,616
And there are a number of constants
121
00:03:59,872 --> 00:04:00,640
Come in
122
00:04:00,896 --> 00:04:01,920
A fragment function
123
00:04:02,176 --> 00:04:02,944
That we can
124
00:04:03,712 --> 00:04:06,016
And this is all done under the hood behind the scenes
125
00:04:06,272 --> 00:04:08,064
You can do this as a method that
126
00:04:08,320 --> 00:04:09,088
Overriding
127
00:04:10,368 --> 00:04:11,904
Specify the shaded function
128
00:04:12,416 --> 00:04:17,024
So the first thing that we should know about is the colour constant which is an all caps colour
129
00:04:17,280 --> 00:04:18,559
And this is the way that you
130
00:04:18,815 --> 00:04:19,583
The colour of
131
00:04:19,839 --> 00:04:20,863
The pixel
132
00:04:21,119 --> 00:04:24,191
This fragment function runs for every pixel in the shade
133
00:04:24,447 --> 00:04:27,007
So we can say colour is equal to
134
00:04:27,263 --> 00:04:27,775
Now
135
00:04:28,031 --> 00:04:29,823
A colour is represented as a verb
136
00:04:30,079 --> 00:04:32,639
4 witches of 4 parameter
137
00:04:32,895 --> 00:04:33,663
Or for
138
00:04:33,919 --> 00:04:34,687
Element
139
00:04:35,455 --> 00:04:36,991
And so we can represent
140
00:04:37,247 --> 00:04:38,015
Perfect for
141
00:04:38,271 --> 00:04:44,159
Just like so and we can do this apply for arguments here or against buy one argument because that will be duplicated all
142
00:04:44,415 --> 00:04:45,439
Across all the
143
00:04:45,951 --> 00:04:48,511
And then we do need to end our statements with
144
00:04:49,023 --> 00:04:49,535
Sell my car
145
00:04:50,047 --> 00:04:53,887
So if I just simply write this line what I've told the shooter to do
146
00:04:54,143 --> 00:04:56,191
Is make every pixel in
147
00:04:56,447 --> 00:04:56,959
The texture
148
00:04:57,215 --> 00:04:57,727
White
149
00:04:57,983 --> 00:05:00,543
Now you'll notice that also affects the transparent
150
00:05:00,799 --> 00:05:01,311
Because
151
00:05:01,567 --> 00:05:02,591
Transparent picture
152
00:05:02,847 --> 00:05:04,383
Exist in the image there just try
153
00:05:05,407 --> 00:05:07,967
Ok so how's that help well we essentially
154
00:05:08,223 --> 00:05:08,735
Turn the
155
00:05:08,991 --> 00:05:09,759
All white
156
00:05:10,015 --> 00:05:11,295
When anime gets here
157
00:05:11,807 --> 00:05:13,599
But we're not quite done with the shade
158
00:05:14,111 --> 00:05:16,927
So what we need to do first as we need the first crab
159
00:05:17,183 --> 00:05:17,695
The
160
00:05:17,951 --> 00:05:19,999
Colour of the pixel coming from the shower
161
00:05:20,511 --> 00:05:21,791
And select create a new
162
00:05:22,047 --> 00:05:23,583
Variable and we're going to say
163
00:05:23,839 --> 00:05:24,863
Vac for
164
00:05:25,375 --> 00:05:28,191
And in the shader language you have to specify the time
165
00:05:28,703 --> 00:05:29,215
That
166
00:05:29,471 --> 00:05:30,495
You are using you
167
00:05:31,007 --> 00:05:31,519
Music via
168
00:05:31,775 --> 00:05:33,055
Solvac for
169
00:05:33,567 --> 00:05:34,591
Texture colour
170
00:05:34,847 --> 00:05:36,127
Text underscore
171
00:05:36,383 --> 00:05:37,151
Is equal to
172
00:05:37,663 --> 00:05:39,455
Texture which is a function
173
00:05:39,967 --> 00:05:40,991
In parentheses
174
00:05:41,247 --> 00:05:42,527
Learning or cabs
175
00:05:42,783 --> 00:05:43,551
Texture
176
00:05:44,063 --> 00:05:45,087
Can an orca
177
00:05:45,343 --> 00:05:45,855
Cuv
178
00:05:46,111 --> 00:05:46,879
And then put it all in
179
00:05:47,391 --> 00:05:50,719
And a letter place this colour line right here with
180
00:05:50,975 --> 00:05:51,999
Texture colour
181
00:05:52,767 --> 00:05:54,559
Ok so what is this line doing
182
00:05:54,815 --> 00:06:00,447
We're saying let's create a texture colour variable that is of type vector for cos remember colours are
183
00:06:00,703 --> 00:06:03,263
Red green blue and Alpha
184
00:06:03,775 --> 00:06:04,799
So that's 4
185
00:06:05,823 --> 00:06:09,663
And then the texture function tells us ok we want to read
186
00:06:10,175 --> 00:06:11,199
The value
187
00:06:11,455 --> 00:06:12,991
Of a pixel
188
00:06:13,247 --> 00:06:16,575
At the specified texture at the specified UV
189
00:06:16,831 --> 00:06:18,111
Now this texture
190
00:06:18,367 --> 00:06:21,183
May seem like magic but this is one of those Constance
191
00:06:21,439 --> 00:06:22,719
That's coming into the funk
192
00:06:23,231 --> 00:06:26,559
Soudal already knows that the texture that attach
193
00:06:27,583 --> 00:06:28,607
Is this
194
00:06:28,863 --> 00:06:31,423
Stay here and so it's stuff that text you
195
00:06:31,679 --> 00:06:32,959
Data into this car
196
00:06:34,239 --> 00:06:35,519
And then the UV
197
00:06:35,775 --> 00:06:37,823
Is essentially a corner
198
00:06:38,079 --> 00:06:38,847
It's a vector to
199
00:06:39,359 --> 00:06:41,151
Wait between 0 and 1 in the
200
00:06:41,407 --> 00:06:42,943
0 and 1 in the Y
201
00:06:43,199 --> 00:06:44,479
That represents
202
00:06:44,735 --> 00:06:45,503
The position
203
00:06:46,015 --> 00:06:47,807
Of the pixel that were looking at in the 10
204
00:06:48,319 --> 00:06:49,343
And I guess that's just
205
00:06:49,599 --> 00:06:53,695
I'm sure there's a lot of technical optimisations behind why UV
206
00:06:53,951 --> 00:06:54,463
Is
207
00:06:54,719 --> 00:06:57,023
Who won in the accident 021 in the way
208
00:06:57,279 --> 00:06:58,559
So basically that's the person
209
00:06:58,815 --> 00:06:59,583
From the
210
00:06:59,839 --> 00:07:00,863
And the percent
211
00:07:01,119 --> 00:07:02,399
The top that real
212
00:07:03,423 --> 00:07:06,751
Would be in the top left corner here
213
00:07:07,007 --> 00:07:07,775
And then
214
00:07:08,031 --> 00:07:12,127
You know point 5.5 would be in the middle and again UV is
215
00:07:12,639 --> 00:07:15,199
Being passed in for us as a constant
216
00:07:15,711 --> 00:07:16,223
So
217
00:07:16,479 --> 00:07:20,063
This fragment has been called essentially for each pixel
218
00:07:20,319 --> 00:07:22,111
Orridge UV core network
219
00:07:22,879 --> 00:07:23,391
Ok
220
00:07:23,903 --> 00:07:30,047
So what these two lines together are doing is saying grab the colour of the current pixel that were looking at
221
00:07:30,303 --> 00:07:32,863
And then assign our colour out
222
00:07:33,119 --> 00:07:33,631
Switch to that
223
00:07:34,655 --> 00:07:36,959
Ok I'm going to remove this comment because we don't need it
224
00:07:37,215 --> 00:07:41,567
So this is a very basic tool I'm sure that essentially just writes the text
225
00:07:41,823 --> 00:07:42,847
Switch on the screen ok
226
00:07:43,103 --> 00:07:45,407
So how do we actually manipulate the stag
227
00:07:45,919 --> 00:07:47,967
In our case we want to make the Sprite alright
228
00:07:48,991 --> 00:07:49,759
How can we do
229
00:07:50,271 --> 00:07:53,343
To make our character or our text you're always
230
00:07:53,855 --> 00:07:56,927
We can use the mix function which is
231
00:07:57,183 --> 00:08:03,071
Essentially the same as linear interpolate we've used the linear interpolate in quite a few places already
232
00:08:03,327 --> 00:08:04,863
And we can do the same in shade
233
00:08:05,119 --> 00:08:05,887
It's just the funk
234
00:08:06,143 --> 00:08:06,911
When's our call
235
00:08:07,423 --> 00:08:09,471
A little bit different with the name the little that differ
236
00:08:09,727 --> 00:08:12,031
So we want to essentially
237
00:08:12,287 --> 00:08:13,055
Mix
238
00:08:13,311 --> 00:08:14,335
Between why
239
00:08:15,871 --> 00:08:19,967
The colour because we want the flash to happen and then for it to fade Out
240
00:08:20,223 --> 00:08:23,807
And so that implies that we need a transition
241
00:08:24,063 --> 00:08:25,343
Or a linear inter
242
00:08:25,855 --> 00:08:30,975
Ok so how we can do that well first let's write our lines so let's do that for
243
00:08:31,487 --> 00:08:34,047
Final underscore colour is equal to
244
00:08:34,303 --> 00:08:35,071
Makes
245
00:08:35,583 --> 00:08:36,607
An open for rent
246
00:08:37,119 --> 00:08:38,655
Pixar texture colour
247
00:08:38,911 --> 00:08:40,191
And we're going to mix two
248
00:08:40,447 --> 00:08:42,751
Vector 4 in Lincoln represent
249
00:08:43,263 --> 00:08:48,895
However were going to write 1.03 times for the RGB channels
250
00:08:49,151 --> 00:08:50,943
And then the alpha this is very
251
00:08:51,455 --> 00:08:53,759
We want to use the texture colour Alpha
252
00:08:54,271 --> 00:08:56,831
So we can do text to colour got a
253
00:08:57,087 --> 00:09:01,951
For alpha and then we can put let's say 1.0 as our third are
254
00:09:02,463 --> 00:09:03,999
And then end with a summer cold
255
00:09:04,511 --> 00:09:05,023
Ok
256
00:09:05,279 --> 00:09:09,631
And then our colour output can be instead of texture colour or cold
257
00:09:09,887 --> 00:09:10,655
Final colour
258
00:09:11,935 --> 00:09:14,495
And now you should see that you're texture
259
00:09:14,751 --> 00:09:15,263
Is all
260
00:09:15,519 --> 00:09:18,079
Let me explain this mix line a little bit more
261
00:09:19,103 --> 00:09:19,871
So we're mixing
262
00:09:20,127 --> 00:09:21,151
Which is lenient
263
00:09:21,407 --> 00:09:23,199
We're going from Artex to colour
264
00:09:23,711 --> 00:09:24,479
To White
265
00:09:24,991 --> 00:09:25,759
With this way
266
00:09:26,015 --> 00:09:30,111
So if I turn this one point out the end down to 5 or .5
267
00:09:30,367 --> 00:09:33,183
That will be halfway between the texture colour and purity
268
00:09:33,695 --> 00:09:39,583
Now what is this factor for in here while this factor 4 is a colour right this is another colour that with representing
269
00:09:39,839 --> 00:09:43,167
And wait is a value of 1.0
270
00:09:43,423 --> 00:09:45,983
In all the RGB HR
271
00:09:46,751 --> 00:09:49,311
But if we don't put a texture colour in here
272
00:09:49,567 --> 00:09:51,359
And instead do 1.0
273
00:09:51,615 --> 00:09:54,175
You can see that now has filled in
274
00:09:54,687 --> 00:09:55,711
The entire box
275
00:09:56,223 --> 00:09:57,759
So we need to use texture colour
276
00:09:58,015 --> 00:10:00,319
Start a witch is how we reference
277
00:10:00,345 --> 00:10:02,504
Subtitled by
online-courses.club
We compress knowledge for you!
278
00:10:02,505 --> 00:10:01,855
The alpha channel of the
279
00:10:02,367 --> 00:10:03,647
Colour which is a factor of 4
280
00:10:04,415 --> 00:10:04,927
And
281
00:10:05,183 --> 00:10:09,535
That way we can preserve the transparency of the pixels that are supposed to be transferred
282
00:10:10,047 --> 00:10:11,839
A quick word on accessing
283
00:10:12,095 --> 00:10:13,631
Text akala with this
284
00:10:14,143 --> 00:10:20,287
I believe this is known as swizzling in that is taking a certain number of the elements
285
00:10:20,799 --> 00:10:22,079
From a vector for
286
00:10:22,335 --> 00:10:24,895
By using this sort of dot notation so
287
00:10:25,151 --> 00:10:25,919
I could say
288
00:10:26,687 --> 00:10:27,455
Vector
289
00:10:27,967 --> 00:10:28,991
Texture colour
290
00:10:29,247 --> 00:10:31,807
Is a vector example
291
00:10:32,319 --> 00:10:34,111
Is equal to texture colour
292
00:10:34,367 --> 00:10:34,879
Start
293
00:10:35,903 --> 00:10:39,487
In what this what do is this will get me a vector 2
294
00:10:39,743 --> 00:10:42,815
Where the first component is the alpha value
295
00:10:43,071 --> 00:10:45,887
Put the texture colour and the second component or the Wykeham
296
00:10:46,399 --> 00:10:47,167
Is the
297
00:10:47,423 --> 00:10:49,727
Read channel value of the
298
00:10:49,983 --> 00:10:50,495
Switch the colour
299
00:10:50,751 --> 00:10:51,775
So I can say
300
00:10:52,031 --> 00:10:54,847
For the final colour downhill my remove this example
301
00:10:55,359 --> 00:10:59,199
For the final colour I could technically do this I can do RGB
302
00:10:59,711 --> 00:11:00,479
Like so
303
00:11:00,735 --> 00:11:02,271
And it wouldn't change anything
304
00:11:02,527 --> 00:11:05,599
Because this is essentially constructing a new vicar for
305
00:11:05,855 --> 00:11:07,135
With each other
306
00:11:07,391 --> 00:11:10,719
From each of these channels in that order course I don't need to do that
307
00:11:10,975 --> 00:11:11,743
But that is used
308
00:11:11,999 --> 00:11:17,375
Because there are some instances where you don't want to change the alpha value and I want to say for instance
309
00:11:17,631 --> 00:11:21,727
Here I just want to change the RGB so I can say color.rgb
310
00:11:21,983 --> 00:11:25,311
No I'm going to get an error because this is a vector for inside of a
311
00:11:26,591 --> 00:11:28,383
It's here but I can do final colour
312
00:11:28,639 --> 00:11:29,151
RGB
313
00:11:29,663 --> 00:11:30,175
And
314
00:11:30,431 --> 00:11:31,199
Science off
315
00:11:31,455 --> 00:11:34,271
Alright so that's a little bit about mix
316
00:11:34,527 --> 00:11:37,855
Now what is this one point of this is how we control
317
00:11:38,111 --> 00:11:39,903
How bright HR
318
00:11:40,159 --> 00:11:40,927
Is in Irish
319
00:11:41,439 --> 00:11:42,719
And this is where uniforms
320
00:11:42,975 --> 00:11:45,535
This is how were going to be able to control this value
321
00:11:45,791 --> 00:11:47,327
From outside of the show
322
00:11:47,839 --> 00:11:49,375
So let's do this let's do
323
00:11:49,631 --> 00:11:52,447
At the top above fragment in below the shadertoy
324
00:11:54,495 --> 00:11:55,007
Hello
325
00:11:55,519 --> 00:11:56,543
What colour
326
00:11:57,823 --> 00:11:59,615
And then we'll just go out and in that day
327
00:11:59,871 --> 00:12:00,895
Ok so now
328
00:12:01,151 --> 00:12:03,455
Instead of this 1.0 at the end of this
329
00:12:03,711 --> 00:12:04,223
Function
330
00:12:04,479 --> 00:12:05,503
I'm going to put in
331
00:12:07,807 --> 00:12:13,695
And what are the uniform is it essentially a variable that we can set from outside the shelter
332
00:12:13,951 --> 00:12:14,719
From something
333
00:12:14,975 --> 00:12:15,487
Make a genius
334
00:12:15,999 --> 00:12:17,791
So this is how you make your shaders variable
335
00:12:18,047 --> 00:12:20,863
And the cool thing about a girl is if I scrolled down
336
00:12:21,375 --> 00:12:23,679
To where my shelter material is
337
00:12:23,935 --> 00:12:26,751
You can see that under the shader parameters heading
338
00:12:27,775 --> 00:12:29,823
Percent is now available for me too
339
00:12:30,335 --> 00:12:31,359
And so I can actually
340
00:12:31,871 --> 00:12:32,895
Put in a value here
341
00:12:33,151 --> 00:12:35,711
And now you can see that it's it's changing over
342
00:12:35,967 --> 00:12:36,991
Like I do 1.0
343
00:12:37,247 --> 00:12:39,039
And I can change it from
344
00:12:39,551 --> 00:12:40,575
The editor now
345
00:12:40,831 --> 00:12:43,903
Call thing about uniforms in shaders as we can give them
346
00:12:44,159 --> 00:12:45,183
Propertyheads
347
00:12:45,439 --> 00:12:46,975
So that we could for example
348
00:12:47,231 --> 00:12:49,791
Constrain this range to be between 0 and
349
00:12:50,303 --> 00:12:52,095
The way that we can do that no shadow
350
00:12:53,375 --> 00:12:53,887
Colin
351
00:12:54,143 --> 00:12:55,935
Hint underscore range
352
00:12:56,191 --> 00:12:57,727
And then let's do 0.0
353
00:12:58,239 --> 00:12:58,751
And one
354
00:12:59,519 --> 00:13:00,543
Now you can see
355
00:13:00,799 --> 00:13:01,311
Mila
356
00:13:01,567 --> 00:13:02,591
Percent over here
357
00:13:02,847 --> 00:13:04,383
Now has a little slider button
358
00:13:04,639 --> 00:13:07,967
Or I can manually drag it between 0 and 1
359
00:13:08,223 --> 00:13:11,295
And it cannot exceed those values at least in the editor
360
00:13:11,551 --> 00:13:14,879
I believe that if you were going to cold and said it to something like a hundred
361
00:13:15,135 --> 00:13:16,159
That wouldn't stay
362
00:13:16,415 --> 00:13:18,719
You from doing that so this is a purely edit
363
00:13:18,975 --> 00:13:21,023
It is nice to know
364
00:13:21,279 --> 00:13:24,351
As let's say the game designer what does value is
365
00:13:24,607 --> 00:13:25,119
Supposed
366
00:13:25,631 --> 00:13:27,423
Salt there's are leprosy
367
00:13:27,935 --> 00:13:32,543
Our Hitler shower is working now so we just need to make it actually work
368
00:13:32,799 --> 00:13:34,591
And before we do that let's go ahead
369
00:13:34,847 --> 00:13:36,895
And save this material
370
00:13:37,151 --> 00:13:38,687
So I'm going to
371
00:13:38,943 --> 00:13:42,527
We already have the shader saved but I'm going to see the material as well so I'm good
372
00:13:43,039 --> 00:13:43,551
Save
373
00:13:43,807 --> 00:13:46,879
This by clicking the drop down at the material level
374
00:13:47,135 --> 00:13:48,671
Click the dropdown Click
375
00:13:48,927 --> 00:13:49,439
Save
376
00:13:49,695 --> 00:13:51,999
And we can save it in our
377
00:13:52,255 --> 00:13:57,887
Siemens component directory but I'm going to call this hip flash component underscore material
378
00:13:58,143 --> 00:13:59,167
Try
379
00:14:00,959 --> 00:14:03,775
And so now you should have butter sugar and or material
380
00:14:04,287 --> 00:14:06,079
Another thing I'm going to do now
381
00:14:06,335 --> 00:14:07,871
Is we are going to
382
00:14:08,383 --> 00:14:09,407
Start intergrade
383
00:14:09,663 --> 00:14:13,503
So let's go to our basic anime scene biting control shift
384
00:14:14,015 --> 00:14:14,783
And opening that
385
00:14:15,039 --> 00:14:17,343
This will be the first one we integrate so
386
00:14:17,599 --> 00:14:20,159
What I'm going to do is I'm going to instantiate a child scene
387
00:14:20,671 --> 00:14:21,439
I'm going to
388
00:14:21,695 --> 00:14:23,999
Instantiated hit flash component era
389
00:14:25,535 --> 00:14:28,095
Ok perfect and we still have that our example texture
390
00:14:28,351 --> 00:14:29,887
Set up so I'm going to go back to
391
00:14:30,143 --> 00:14:31,167
Get Flash components
392
00:14:31,423 --> 00:14:32,959
And delete this Sprite here
393
00:14:33,215 --> 00:14:35,007
I pressing delete on my keyboard
394
00:14:35,263 --> 00:14:36,287
And then remove
395
00:14:37,567 --> 00:14:40,895
Let's go back to a basic enemy so I've gotta hit flash component now
396
00:14:41,151 --> 00:14:43,199
This is a note to die
397
00:14:43,455 --> 00:14:48,319
And I don't think it actually needs to be a no 2D so let's go and see
398
00:14:48,575 --> 00:14:49,599
I'm going to go to my head
399
00:14:49,855 --> 00:14:53,695
Which component let's just right click on this right here and click changed
400
00:14:54,207 --> 00:14:55,743
And we're going to change that
401
00:14:55,999 --> 00:14:58,047
Two nodes that are hid flash component
402
00:14:58,303 --> 00:15:02,655
And then let's open up our script and we have to make sure to change this extends now
403
00:15:03,423 --> 00:15:05,983
This is very important if you don't do this the game or crash
404
00:15:06,239 --> 00:15:08,543
So when you make sure that extends node instead
405
00:15:09,567 --> 00:15:12,383
Let's go back to our basic enemy again
406
00:15:12,639 --> 00:15:13,407
Open up
407
00:15:13,663 --> 00:15:14,943
Our 2D
408
00:15:15,199 --> 00:15:16,223
Contact up
409
00:15:16,479 --> 00:15:21,599
And we can close the shader editor as well by just clicking the shader editor button so we have a little bit more
410
00:15:21,855 --> 00:15:26,463
On-screen let's move this Hitler component up near the other node Basecamp
411
00:15:26,719 --> 00:15:27,743
So
412
00:15:27,999 --> 00:15:29,791
With all the other white no type
413
00:15:30,047 --> 00:15:30,815
And
414
00:15:31,071 --> 00:15:31,839
Here's what we want
415
00:15:32,351 --> 00:15:36,959
We want to assign health component by dragon dropping a health component into
416
00:15:37,215 --> 00:15:38,239
The health component prop
417
00:15:38,751 --> 00:15:40,543
And then we want to take a spray tan do the same
418
00:15:42,335 --> 00:15:44,127
Let's go back to our hits
419
00:15:44,383 --> 00:15:44,895
Components
420
00:15:45,151 --> 00:15:46,175
In an open up that's
421
00:15:46,687 --> 00:15:48,223
That material we created
422
00:15:48,479 --> 00:15:51,807
Remember that material existed on our little
423
00:15:52,063 --> 00:15:53,343
Example
424
00:15:53,599 --> 00:15:55,903
That we were testing to make sure that a sheet of wood
425
00:15:56,159 --> 00:15:58,463
So that material describes essential
426
00:15:58,975 --> 00:15:59,999
How the spray
427
00:16:00,255 --> 00:16:01,535
Or that no 2D
428
00:16:01,791 --> 00:16:04,351
And more appropriately the canvas item
429
00:16:04,863 --> 00:16:08,959
How should a canvas item be rendered that's essentially what a material
430
00:16:09,471 --> 00:16:10,751
Roughly does
431
00:16:11,007 --> 00:16:14,591
And so in order to be able to do the Flash
432
00:16:15,103 --> 00:16:15,871
On a spray
433
00:16:16,127 --> 00:16:18,175
The Sprite has to have that material
434
00:16:18,687 --> 00:16:19,711
So what we're going to do
435
00:16:19,967 --> 00:16:24,575
Is we're going to assign that material to the the Sprite that we have a reference to
436
00:16:24,831 --> 00:16:27,135
When the hit flash component becomes
437
00:16:27,903 --> 00:16:28,671
So let's do it
438
00:16:28,927 --> 00:16:29,951
I'm going to say
439
00:16:30,207 --> 00:16:30,719
Bar
440
00:16:30,975 --> 00:16:31,999
What's a hit
441
00:16:33,535 --> 00:16:34,303
Material
442
00:16:34,559 --> 00:16:36,863
I'm gonna use the preload again so preload
443
00:16:37,119 --> 00:16:39,167
And then we can just look for hip flask
444
00:16:39,423 --> 00:16:40,191
Material
445
00:16:40,447 --> 00:16:42,751
I just typing hit Flash and then some
446
00:16:43,263 --> 00:16:44,543
The hip flask and
447
00:16:44,799 --> 00:16:45,567
Material there
448
00:16:45,823 --> 00:16:49,407
So we're preloading in the same way that we pre-loaded the scene before
449
00:16:49,663 --> 00:16:51,199
Preloading that material
450
00:16:51,455 --> 00:16:52,223
Turn on red
451
00:16:52,735 --> 00:16:54,015
I'm going to say
452
00:16:54,271 --> 00:16:55,039
Sprite
453
00:16:55,295 --> 00:16:57,599
What material is equal to
454
00:16:57,855 --> 00:16:58,623
Hip flask
455
00:16:58,879 --> 00:16:59,391
Material
456
00:17:00,415 --> 00:17:02,463
So now and the health gets changed
457
00:17:02,719 --> 00:17:03,743
Are we go
458
00:17:04,767 --> 00:17:06,047
We're going to play that
459
00:17:06,559 --> 00:17:09,119
And once again we're going to use a twin for this
460
00:17:09,631 --> 00:17:11,935
Sign in to save our queen is equal to
461
00:17:12,191 --> 00:17:12,959
Create twin
462
00:17:14,751 --> 00:17:20,895
And we could end up in a situation where the enemy gets hit multiple times so let's actually store up
463
00:17:21,407 --> 00:17:23,199
A reference to hit
464
00:17:23,455 --> 00:17:24,223
Flash 2
465
00:17:26,015 --> 00:17:28,319
And when I going to sign that anything but we can type
466
00:17:28,575 --> 00:17:29,599
Let me know what type of
467
00:17:29,855 --> 00:17:31,391
And that is going to be of type
468
00:17:32,159 --> 00:17:32,671
Tween
469
00:17:33,695 --> 00:17:34,207
Ok
470
00:17:34,463 --> 00:17:38,559
So on health change what we're going to do is we are going to first Choice
471
00:17:40,095 --> 00:17:41,119
Flash Queen
472
00:17:41,375 --> 00:17:42,655
Is not equal to null
473
00:17:43,935 --> 00:17:44,959
Was 2 episodes
474
00:17:45,215 --> 00:17:45,727
Hit
475
00:17:45,983 --> 00:17:48,287
Flash queen.is
476
00:17:48,543 --> 00:17:49,055
Valid
477
00:17:49,823 --> 00:17:52,383
We're going to say hit Flash Queen
478
00:17:53,151 --> 00:17:53,663
Kill
479
00:17:54,431 --> 00:17:55,455
What is this line do
480
00:17:55,711 --> 00:17:59,807
Essentially if we already have a hit Flash Queen
481
00:18:00,063 --> 00:18:01,343
That is currently run
482
00:18:01,599 --> 00:18:02,879
Which is what is valid
483
00:18:03,135 --> 00:18:04,415
It is valid as a tween
484
00:18:04,671 --> 00:18:08,255
Can still be used and is still running I believe
485
00:18:08,511 --> 00:18:13,887
We can click into here and see a valid twin is essentially a tween that is ready to go or
486
00:18:14,143 --> 00:18:14,911
Is currently run
487
00:18:15,679 --> 00:18:20,287
I'm sure the logic is a little bit different but you can read the documentation Again by control
488
00:18:20,799 --> 00:18:21,567
Clicking in
489
00:18:22,079 --> 00:18:24,639
Sing if the Flash Queen is still there
490
00:18:24,895 --> 00:18:25,407
Wheel
491
00:18:25,663 --> 00:18:26,431
Kill it with
492
00:18:26,687 --> 00:18:27,455
Invalid
493
00:18:27,711 --> 00:18:28,223
What's the tween
494
00:18:28,479 --> 00:18:30,015
And then we can reassign
495
00:18:30,271 --> 00:18:33,599
So that we don't have two twins running so we can stay here
496
00:18:33,855 --> 00:18:34,879
Are hip flash team
497
00:18:35,135 --> 00:18:36,415
Tween is equal to
498
00:18:36,671 --> 00:18:37,183
Create
499
00:18:37,951 --> 00:18:38,975
Now whatever you want
500
00:18:39,231 --> 00:18:43,327
We want a run between we want to clean a property so hit flash twin
501
00:18:44,351 --> 00:18:45,119
Twin prop
502
00:18:45,631 --> 00:18:48,703
What property do we want to win this is where things get a little
503
00:18:50,239 --> 00:18:53,055
So the object that we wanted to lean is the sprite
504
00:18:53,311 --> 00:18:54,079
Because that
505
00:18:54,335 --> 00:18:56,639
Where our material is remember
506
00:18:56,895 --> 00:18:58,943
We want to manipulate or change
507
00:18:59,199 --> 00:19:00,735
That uniform Valley
508
00:19:01,247 --> 00:19:03,807
That We Created so let me go ahead and open up my
509
00:19:04,319 --> 00:19:04,831
Hip flask
510
00:19:05,087 --> 00:19:05,599
Component
511
00:19:05,855 --> 00:19:06,879
Material hair
512
00:19:07,391 --> 00:19:09,183
We want to manipulate this
513
00:19:09,439 --> 00:19:09,951
Percent
514
00:19:10,207 --> 00:19:12,255
Which is a property of the material
515
00:19:12,511 --> 00:19:15,071
Which is going to be attached to our Sprite as
516
00:19:15,327 --> 00:19:20,191
What is this first argument is essentially what object owns the property
517
00:19:20,447 --> 00:19:21,727
You're trying to try
518
00:19:22,239 --> 00:19:23,263
In our case
519
00:19:23,519 --> 00:19:24,031
The sprite
520
00:19:24,543 --> 00:19:26,335
Tweenies right now
521
00:19:26,591 --> 00:19:28,639
You can go ahead and open up the hip flask
522
00:19:28,895 --> 00:19:29,663
Component shader
523
00:19:29,919 --> 00:19:31,967
Or sorry to Hitler's component material
524
00:19:32,991 --> 00:19:35,295
If you're curious about how are actually going to
525
00:19:35,551 --> 00:19:36,319
Does what the property
526
00:19:36,831 --> 00:19:38,879
You can actually just go ahead in a hover over
527
00:19:39,391 --> 00:19:40,159
And you can see that
528
00:19:40,415 --> 00:19:42,207
Property shader parameter
529
00:19:43,231 --> 00:19:46,559
Data type that allows or you can right click this
530
00:19:46,815 --> 00:19:48,863
Percent and copy the property
531
00:19:49,375 --> 00:19:50,143
Right here
532
00:19:50,399 --> 00:19:51,935
Someone to copy that property
533
00:19:52,447 --> 00:19:53,215
And then I'm going to pay
534
00:19:53,983 --> 00:19:56,799
For the property that we want to Twin so
535
00:19:57,055 --> 00:19:58,335
Double quotes in then
536
00:19:59,359 --> 00:19:59,871
Paris
537
00:20:00,127 --> 00:20:01,151
Associated Press
538
00:20:01,919 --> 00:20:03,455
Percent and then we want to live
539
00:20:03,967 --> 00:20:04,479
From
540
00:20:04,735 --> 00:20:06,783
We want to learn for two
541
00:20:07,039 --> 00:20:07,551
Rather
542
00:20:07,807 --> 00:20:09,343
And let's say the duration
543
00:20:12,159 --> 00:20:14,463
Now you'll notice that were loving 20
544
00:20:14,719 --> 00:20:15,999
We're not actually setting
545
00:20:16,255 --> 00:20:20,351
The parameter to one so we have to manually set that as well
546
00:20:20,863 --> 00:20:22,399
So let's take our sprite
547
00:20:22,655 --> 00:20:24,447
And then we're going to do dad material
548
00:20:24,703 --> 00:20:25,471
That's it
549
00:20:25,727 --> 00:20:28,543
Now the thing is the material can either be
550
00:20:29,567 --> 00:20:30,591
Shader material
551
00:20:30,847 --> 00:20:33,151
Or I believe the other material
552
00:20:33,407 --> 00:20:33,919
Is
553
00:20:34,431 --> 00:20:34,943
Look at it
554
00:20:35,199 --> 00:20:37,503
Yeah could be a canvas out of material
555
00:20:37,759 --> 00:20:39,807
As shown here or a sheet
556
00:20:40,319 --> 00:20:42,623
So because I can be two different material types
557
00:20:43,135 --> 00:20:43,903
We can't I
558
00:20:45,183 --> 00:20:46,719
NR hit flash component
559
00:20:46,975 --> 00:20:49,535
Script this line that were editing right now
560
00:20:49,791 --> 00:20:50,815
The Sprite material
561
00:20:51,071 --> 00:20:52,863
Ring a cast that as a
562
00:20:53,119 --> 00:20:54,399
Shader material
563
00:20:54,655 --> 00:20:55,935
Ok and then we can do
564
00:20:56,191 --> 00:20:56,959
And it has been
565
00:20:57,215 --> 00:20:57,727
Play the Seas by the
566
00:20:57,983 --> 00:21:00,287
No we can do darts said she
567
00:21:01,311 --> 00:21:01,823
Now
568
00:21:02,079 --> 00:21:05,151
The interesting thing about this function is that we don't want
569
00:21:05,407 --> 00:21:05,919
Include
570
00:21:06,175 --> 00:21:07,455
This first line
571
00:21:07,711 --> 00:21:08,223
Here
572
00:21:08,479 --> 00:21:09,759
Words share price
573
00:21:10,271 --> 00:21:12,319
Slash we just want to do in Clare
574
00:21:12,575 --> 00:21:13,087
Cancel alarm
575
00:21:13,343 --> 00:21:13,855
Percent
576
00:21:14,111 --> 00:21:15,903
And we're going to set it to 1 point
577
00:21:16,416 --> 00:21:18,720
So was setting the value to 1
578
00:21:18,976 --> 00:21:19,744
4 weeks
579
00:21:20,000 --> 00:21:22,048
Between and tween it down to 0
580
00:21:22,560 --> 00:21:23,072
Play 2 seconds
581
00:21:24,352 --> 00:21:24,864
Ok
582
00:21:25,120 --> 00:21:26,656
And we've got that set up in Ark
583
00:21:26,912 --> 00:21:28,192
Enemy are hit
584
00:21:28,448 --> 00:21:30,496
And again make sure that the health component
585
00:21:31,520 --> 00:21:33,568
Set a let's run a game and see what
586
00:21:35,104 --> 00:21:35,616
Ok
587
00:21:35,872 --> 00:21:38,176
So first of all all of our enemies are we
588
00:21:38,688 --> 00:21:40,736
We are getting an error so what is that
589
00:21:41,248 --> 00:21:44,832
In our area is that there's a type mismatch between initial and final
590
00:21:45,344 --> 00:21:45,856
Ok
591
00:21:46,112 --> 00:21:46,880
And why is that
592
00:21:47,136 --> 00:21:48,672
That's actually a mistake that I made
593
00:21:48,928 --> 00:21:52,000
Right here remember how is talking about what is the object
594
00:21:52,256 --> 00:21:54,304
That contains the property that we want to live
595
00:21:54,560 --> 00:21:58,912
I'm actually slightly wrong about the object that contains the property we want to live
596
00:21:59,424 --> 00:22:01,984
The property centre Primula percent does not
597
00:22:02,240 --> 00:22:03,264
Exist on spray
598
00:22:03,776 --> 00:22:05,056
It exist on spray
599
00:22:05,312 --> 00:22:05,824
Material
600
00:22:06,592 --> 00:22:10,432
So this can be a little bit confusing even trips me up every so often
601
00:22:10,944 --> 00:22:12,480
This property exists on
602
00:22:12,736 --> 00:22:14,528
Material and the material
603
00:22:14,784 --> 00:22:15,296
On the sprite
604
00:22:15,552 --> 00:22:16,320
So we
605
00:22:16,576 --> 00:22:17,600
The specified that we
606
00:22:17,856 --> 00:22:18,368
Not too long
607
00:22:18,880 --> 00:22:20,416
Sprite material property
608
00:22:20,928 --> 00:22:21,696
Shade of Brenda
609
00:22:22,720 --> 00:22:24,256
Let's going to run the game again
610
00:22:24,512 --> 00:22:26,304
Now you'll notice that when we hit an enemy
611
00:22:26,560 --> 00:22:27,840
All of the other and
612
00:22:28,096 --> 00:22:29,120
Please turn white at the same
613
00:22:29,888 --> 00:22:30,400
As well
614
00:22:30,656 --> 00:22:32,448
And this can be a very
615
00:22:32,704 --> 00:22:34,496
Confusing thing
616
00:22:34,752 --> 00:22:37,056
4 especially people that are new to good
617
00:22:37,824 --> 00:22:40,128
I'm going to try to do my best to explain why this is
618
00:22:40,640 --> 00:22:42,944
In order to explain that I'm going to open up my
619
00:22:43,200 --> 00:22:43,968
Flash Campo
620
00:22:44,480 --> 00:22:44,992
Material
621
00:22:45,248 --> 00:22:45,760
So
622
00:22:46,016 --> 00:22:49,344
This material in addition to 8 on about the thing
623
00:22:49,600 --> 00:22:51,648
Basically everything and good all is
624
00:22:52,416 --> 00:22:52,928
Ascent
625
00:22:53,440 --> 00:22:56,512
There are slight differences between the types of resources but
626
00:22:56,768 --> 00:22:58,048
When we created our
627
00:22:58,560 --> 00:23:01,376
Resources up here our theme is a resource
628
00:23:01,632 --> 00:23:05,472
Ok H ask that trys is a resource
629
00:23:05,984 --> 00:23:07,776
Our tileset is a resource
630
00:23:08,032 --> 00:23:11,104
If we right click into anywhere and then just go to New
631
00:23:11,616 --> 00:23:12,384
Resource
632
00:23:12,640 --> 00:23:14,432
Deezer all Reece
633
00:23:16,224 --> 00:23:18,016
And the thing about resources
634
00:23:18,272 --> 00:23:19,040
Is that
635
00:23:19,296 --> 00:23:20,064
A reference
636
00:23:20,576 --> 00:23:22,368
Of a Resources share
637
00:23:22,624 --> 00:23:24,672
Between all seems that
638
00:23:24,928 --> 00:23:25,440
Music
639
00:23:25,696 --> 00:23:27,488
And that means that when you change
640
00:23:27,744 --> 00:23:29,280
One instance of
641
00:23:29,536 --> 00:23:32,352
Resources it will be reflected all across
642
00:23:32,608 --> 00:23:33,888
The other instances of the
643
00:23:34,656 --> 00:23:36,704
And so the situation that were ending up in
644
00:23:37,216 --> 00:23:38,240
Is that we are
645
00:23:38,496 --> 00:23:40,800
Attaching this shader material resource
646
00:23:41,312 --> 00:23:42,336
To every any
647
00:23:42,848 --> 00:23:45,152
And therefore every enemy is
648
00:23:45,664 --> 00:23:47,200
Sharing the same
649
00:23:47,456 --> 00:23:48,224
Material resource
650
00:23:48,736 --> 00:23:52,320
That means that when we change a parameter on that resource
651
00:23:52,576 --> 00:23:53,856
It will be reflected
652
00:23:54,112 --> 00:23:56,160
Everywhere that this instance of
653
00:23:56,416 --> 00:23:56,928
Resource
654
00:23:57,696 --> 00:24:00,256
So essentially resources are real
655
00:24:00,768 --> 00:24:01,536
By default
656
00:24:01,792 --> 00:24:02,304
Every
657
00:24:02,816 --> 00:24:04,608
So if you reference them all the time
658
00:24:04,864 --> 00:24:07,168
You'll be referencing the same underlying
659
00:24:07,680 --> 00:24:11,520
Luckily there is a fixed that in that is this button right
660
00:24:11,776 --> 00:24:15,104
To hear so with the hit flash component material
661
00:24:15,360 --> 00:24:16,896
In contact him
662
00:24:17,152 --> 00:24:18,432
This property
663
00:24:18,688 --> 00:24:20,736
Resource local to scene
664
00:24:20,992 --> 00:24:21,760
Is what we
665
00:24:22,016 --> 00:24:24,064
And this says if you have her over it
666
00:24:24,320 --> 00:24:26,368
That the resource is duplicate
667
00:24:26,880 --> 00:24:28,416
When this is set to true
668
00:24:28,672 --> 00:24:34,048
And what duplicating a resource does is that it makes it a unique instance of that resource
669
00:24:34,560 --> 00:24:35,328
Which means that
670
00:24:35,584 --> 00:24:37,376
When we change things like the law
671
00:24:37,632 --> 00:24:40,448
Percent it will only be isolated
672
00:24:40,704 --> 00:24:41,216
2
673
00:24:41,472 --> 00:24:44,288
This unique instance instead of being properly
674
00:24:44,544 --> 00:24:45,056
Across
675
00:24:45,312 --> 00:24:46,848
The same instance that share
676
00:24:47,104 --> 00:24:47,616
Among
677
00:24:47,872 --> 00:24:49,664
Multiple enemies for example
678
00:24:49,920 --> 00:24:52,992
So we can turn on this local to seen property
679
00:24:53,248 --> 00:24:58,368
Now the thing about this is that this will not work with the preloader strategy network
680
00:24:58,624 --> 00:24:59,136
Using
681
00:24:59,392 --> 00:25:01,440
Here in our hit flash composed
682
00:25:01,696 --> 00:25:03,488
Script but there's an easy fix
683
00:25:03,744 --> 00:25:05,024
We're simply going to
684
00:25:05,536 --> 00:25:07,584
Move the hit flash material
685
00:25:07,840 --> 00:25:08,608
In r script
686
00:25:08,864 --> 00:25:09,888
To the expert
687
00:25:10,400 --> 00:25:12,192
Add an export Direct
688
00:25:12,448 --> 00:25:12,960
Over here
689
00:25:13,216 --> 00:25:16,544
And then let's go ahead and remove the preload
690
00:25:17,824 --> 00:25:21,152
And remove the equal sign and then we're going to type this with colon
691
00:25:21,408 --> 00:25:22,176
And we're going to use
692
00:25:22,432 --> 00:25:22,944
Cher
693
00:25:24,224 --> 00:25:24,736
So that
694
00:25:24,992 --> 00:25:26,528
We know what type it is
695
00:25:26,784 --> 00:25:27,296
And then
696
00:25:27,552 --> 00:25:29,344
That's basically the change that we don't make
697
00:25:29,600 --> 00:25:31,904
Now open up your head flash component here
698
00:25:32,160 --> 00:25:33,952
Make sure it's the stand-alone hit
699
00:25:34,208 --> 00:25:36,256
Components seen in the basic anime scene
700
00:25:36,768 --> 00:25:38,560
And then just go ahead and drag over
701
00:25:38,816 --> 00:25:39,584
Hit flash compare
702
00:25:39,840 --> 00:25:40,352
Material
703
00:25:40,608 --> 00:25:41,120
2
704
00:25:41,376 --> 00:25:43,168
Best hip flask material
705
00:25:44,448 --> 00:25:46,496
Now we go back to our basic enemy
706
00:25:46,752 --> 00:25:48,800
We can see that this is going to work
707
00:25:49,056 --> 00:25:50,848
Just fine it's already
708
00:25:51,104 --> 00:25:52,384
And what you'll see is that
709
00:25:52,640 --> 00:25:54,432
There is an undo button here
710
00:25:54,944 --> 00:25:55,456
And
711
00:25:55,712 --> 00:25:57,248
The thing about that is that
712
00:25:57,504 --> 00:26:01,344
That resource local to see in behave the same way in the editor
713
00:26:01,856 --> 00:26:03,392
As it does in games
714
00:26:03,648 --> 00:26:05,952
If I were to hit this undo it will refer
715
00:26:06,208 --> 00:26:06,720
What's 2 hits
716
00:26:06,976 --> 00:26:09,280
Which component in a won't have the undo button anymore
717
00:26:09,536 --> 00:26:11,328
But when I close the scene
718
00:26:11,584 --> 00:26:13,376
This can be seen in reopen it
719
00:26:13,632 --> 00:26:15,424
Because this resource is more
720
00:26:15,680 --> 00:26:18,752
As unique it's creating a new resource in
721
00:26:19,008 --> 00:26:19,520
The
722
00:26:19,776 --> 00:26:20,544
Editor as
723
00:26:21,056 --> 00:26:23,360
So that's just a little quiet but that's me
724
00:26:23,616 --> 00:26:24,640
Don't worry about it all
725
00:26:25,920 --> 00:26:27,712
As long as you've got this resource
726
00:26:27,968 --> 00:26:29,504
Call to seeing schacht in your hip
727
00:26:29,760 --> 00:26:30,528
Composite material
728
00:26:31,040 --> 00:26:32,064
So this one right here
729
00:26:32,320 --> 00:26:33,856
As long as we have that checked
730
00:26:34,112 --> 00:26:35,648
Now animes should be
731
00:26:35,904 --> 00:26:36,672
Flashing
732
00:26:38,976 --> 00:26:41,280
Individually instead of all together
733
00:26:42,560 --> 00:26:48,704
No we still have to implement this for the wizard so I would encourage you to pause the video and go ahead and implemented
734
00:26:48,960 --> 00:26:49,472
Flash compare
735
00:26:49,728 --> 00:26:50,240
For the
736
00:26:50,496 --> 00:26:51,008
Yourself
737
00:26:51,264 --> 00:26:52,544
And I'm going to go ahead and do it
738
00:26:53,056 --> 00:26:53,568
As well
739
00:26:55,616 --> 00:26:58,432
Ok so if you pause the video and get it done
740
00:26:58,688 --> 00:26:59,456
Welcome back
741
00:26:59,712 --> 00:27:03,040
If not that's ok I'm going to open up my wizard enemy
742
00:27:03,296 --> 00:27:04,832
And I'm going to instantiate
743
00:27:05,088 --> 00:27:05,856
Control ship
744
00:27:06,112 --> 00:27:06,624
A
745
00:27:06,880 --> 00:27:08,672
That hit flash company
746
00:27:08,928 --> 00:27:10,720
And I'm going to move that
747
00:27:10,976 --> 00:27:12,512
200 mobile
748
00:27:12,768 --> 00:27:13,280
Component
749
00:27:13,536 --> 00:27:15,584
And then I'm going to move my health component
750
00:27:16,096 --> 00:27:16,608
As Amos
751
00:27:16,864 --> 00:27:17,376
There
752
00:27:17,632 --> 00:27:18,400
And then the same
753
00:27:18,656 --> 00:27:19,168
For the sprite
754
00:27:19,680 --> 00:27:20,192
There
755
00:27:20,960 --> 00:27:24,032
Ok let's give it a quick play test and make sure that every
756
00:27:24,288 --> 00:27:24,800
Sing it is work
757
00:27:25,056 --> 00:27:25,568
Expect
758
00:27:25,824 --> 00:27:27,616
And that's looking good
759
00:27:30,688 --> 00:27:34,528
Now I know this is a long lesson but there is one final thing that I want to do
760
00:27:34,784 --> 00:27:35,808
Does Hitler have component
761
00:27:36,064 --> 00:27:38,624
And I'm going to go ahead and open up my hip flask and pony
762
00:27:38,880 --> 00:27:40,672
And we're just going to change the easy
763
00:27:42,208 --> 00:27:42,720
Between
764
00:27:42,976 --> 00:27:43,488
So
765
00:27:43,744 --> 00:27:47,328
I'm going to change the tip flash tween into down here
766
00:27:47,584 --> 00:27:48,096
So
767
00:27:48,352 --> 00:27:49,888
In our Hitler's components group
768
00:27:50,144 --> 00:27:51,680
This twin property line
769
00:27:51,936 --> 00:27:54,496
I'm going to do a backslash for a new line
770
00:27:54,752 --> 00:27:56,032
And I'm going to do SATs
771
00:27:56,288 --> 00:27:56,800
Is
772
00:27:57,056 --> 00:27:58,592
And I believe you want to use an easy
773
00:27:58,848 --> 00:27:59,360
In
774
00:27:59,616 --> 00:28:00,896
And then I'm going to say sad
775
00:28:01,408 --> 00:28:02,176
Transition
776
00:28:02,432 --> 00:28:03,968
I'm going to do set trance
777
00:28:04,480 --> 00:28:04,992
Cuba
778
00:28:06,016 --> 00:28:08,832
And what that will do is that will keep the enemy bright white
779
00:28:09,088 --> 00:28:09,856
For longer
780
00:28:10,112 --> 00:28:13,184
Before heating up quickly and I'm going to change the duration of
781
00:28:14,208 --> 00:28:15,232
Instead of .2 at
782
00:28:16,000 --> 00:28:17,792
So now let's run it and let's
783
00:28:19,328 --> 00:28:20,608
I think it looks much better
784
00:28:21,632 --> 00:28:23,168
A little bit more
785
00:28:24,192 --> 00:28:24,704
Pronounce
786
00:28:24,960 --> 00:28:25,472
The effect
787
00:28:25,984 --> 00:28:30,080
Not to be too nitpicky but I think I will change the direction to
788
00:28:31,360 --> 00:28:31,872
Instead of
789
00:28:32,640 --> 00:28:33,152
Just to make
790
00:28:33,408 --> 00:28:33,920
A few
791
00:28:34,688 --> 00:28:35,456
Alright
792
00:28:35,968 --> 00:28:37,504
So that is hid flash
793
00:28:38,016 --> 00:28:39,040
4 hour
50823
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.