Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,512 --> 00:00:01,792
Of course our
2
00:00:02,304 --> 00:00:08,448
Survivors Style game here would not be complete without the ability to up
3
00:00:08,704 --> 00:00:09,728
Radio various skill
4
00:00:10,496 --> 00:00:12,288
And we are getting there
5
00:00:12,544 --> 00:00:13,312
We'll get there
6
00:00:13,568 --> 00:00:14,336
Very soon
7
00:00:14,592 --> 00:00:15,104
What does
8
00:00:15,360 --> 00:00:19,456
Will bit more foundational work we need to do before we can actually start
9
00:00:19,968 --> 00:00:20,736
Creating a cyst
10
00:00:21,504 --> 00:00:25,600
And the foundational work that we need to do is to actually transfer
11
00:00:25,856 --> 00:00:26,368
Damage
12
00:00:26,880 --> 00:00:28,416
From the ability
13
00:00:28,672 --> 00:00:29,184
2
14
00:00:29,440 --> 00:00:30,464
The enemy
15
00:00:31,232 --> 00:00:33,024
So if I pull out the basic enemy
16
00:00:34,048 --> 00:00:36,352
The problem here is if I open the Script
17
00:00:36,608 --> 00:00:39,680
Where does cooling health component damage 100
18
00:00:40,448 --> 00:00:42,240
This number needs to be
19
00:00:42,496 --> 00:00:45,568
Determined by the skill that hits the end
20
00:00:46,080 --> 00:00:50,688
And you can see that we need to implement a system for that before we can start doing things
21
00:00:50,944 --> 00:00:51,968
Skill up
22
00:00:52,480 --> 00:00:56,320
So how are we going to transfer the damage let's take a look at the flow of our
23
00:00:56,576 --> 00:00:58,880
Game again so let's go to the player
24
00:00:59,392 --> 00:01:01,037
Scene control shift open the player
25
00:01:01,039 --> 00:01:03,515
Subtitled by
online-courses.club
We compress knowledge for you!
26
00:01:03,516 --> 00:01:06,048
And you can see that we have the sword ability controller
27
00:01:06,560 --> 00:01:09,888
Install the sword ability controller is responsible for
28
00:01:10,144 --> 00:01:11,168
Creating the sword
29
00:01:11,424 --> 00:01:12,192
That then
30
00:01:12,448 --> 00:01:13,728
Will attack the enemy
31
00:01:13,984 --> 00:01:16,032
And so if we look at the sort of Billy
32
00:01:16,288 --> 00:01:17,824
So we open that seem up
33
00:01:18,336 --> 00:01:22,432
Are the sword doesn't actually have a script at all
34
00:01:22,944 --> 00:01:27,040
But the area 2D gets enabled by the animation player
35
00:01:27,296 --> 00:01:28,576
Which enables any
36
00:01:28,832 --> 00:01:29,600
Is to collide
37
00:01:30,112 --> 00:01:33,952
So we have a couple of layers that we need a past damage down from
38
00:01:34,208 --> 00:01:37,792
So the damage alternately needs to come from the sword ability controls
39
00:01:38,048 --> 00:01:40,096
And the reason is because you can imagine
40
00:01:40,352 --> 00:01:42,912
Will want to do upgrades for the sort of building control
41
00:01:43,424 --> 00:01:43,936
And
42
00:01:44,192 --> 00:01:44,704
It will
43
00:01:44,960 --> 00:01:45,984
Take close-up
44
00:01:46,240 --> 00:01:49,568
Chequers upgrades and it will pass those upgrades to the sword
45
00:01:49,824 --> 00:01:51,104
When it's fine
46
00:01:51,872 --> 00:01:57,504
And the way that we are going to tackle this is we're going to create a couple of new components were going to create
47
00:01:57,760 --> 00:01:59,040
Hitbox component
48
00:01:59,296 --> 00:02:00,576
Andy hurt
49
00:02:01,600 --> 00:02:07,744
So let's go ahead and start with the hurtbox component so let's go to our basic anime scene control
50
00:02:08,000 --> 00:02:09,280
How to open up your
51
00:02:10,560 --> 00:02:13,120
And in this basic any we have this area
52
00:02:14,144 --> 00:02:15,168
Let's do this
53
00:02:15,680 --> 00:02:18,496
Let's rename the area2d by clicking into it
54
00:02:19,264 --> 00:02:21,312
And then we're going to call it hurt
55
00:02:21,568 --> 00:02:22,592
Box company
56
00:02:24,384 --> 00:02:27,968
And then let's right click on that note that her box jump on it
57
00:02:28,224 --> 00:02:30,528
Click save branch as seen
58
00:02:31,040 --> 00:02:32,576
Can I go into scenes
59
00:02:33,088 --> 00:02:35,904
Component and we're going to save it alongside our other compare
60
00:02:37,696 --> 00:02:38,208
Ok
61
00:02:38,464 --> 00:02:39,744
Now before we work on
62
00:02:40,000 --> 00:02:41,536
Let's go to our
63
00:02:41,792 --> 00:02:42,560
Sword ability
64
00:02:43,072 --> 00:02:45,120
This area2d right here
65
00:02:45,632 --> 00:02:49,984
We need to take the sword abilities area2d and rename this to hit
66
00:02:50,496 --> 00:02:51,008
Compound
67
00:02:52,032 --> 00:02:55,872
And then we're going to save and we're going to do the same thing we're going to right click the hit box company
68
00:02:56,128 --> 00:02:57,152
Save branch
69
00:02:57,408 --> 00:02:57,920
Scene
70
00:02:58,688 --> 00:03:00,736
We're going to save it alongside our other
71
00:03:02,528 --> 00:03:03,040
Ok
72
00:03:03,808 --> 00:03:09,184
So where the heart box which is going to represent the area of an entity that can
73
00:03:09,696 --> 00:03:10,208
Kit
74
00:03:10,464 --> 00:03:12,000
Buy a hip-hop scum
75
00:03:12,256 --> 00:03:13,280
In the hit box to buy
76
00:03:13,536 --> 00:03:16,608
Is going to be the thing that confers the damage
77
00:03:16,864 --> 00:03:18,400
What is the thing that is attack
78
00:03:19,168 --> 00:03:20,192
The hurt
79
00:03:20,704 --> 00:03:21,728
So it's even play
80
00:03:22,240 --> 00:03:25,824
We have to do one more thing which is that let's click into the head box component
81
00:03:26,080 --> 00:03:27,104
By going into the sea
82
00:03:27,616 --> 00:03:29,920
Let's select the collision shape 2D
83
00:03:30,176 --> 00:03:30,688
Unless
84
00:03:30,944 --> 00:03:32,736
Cut it with ctrl x
85
00:03:32,992 --> 00:03:35,040
Never gonna go back to your sword ability
86
00:03:35,296 --> 00:03:38,112
Highlighter hitbox component and then press ctrl V
87
00:03:39,904 --> 00:03:42,720
Does save our hitbox component so save that
88
00:03:42,976 --> 00:03:45,024
And then we can we name our collision shape to
89
00:03:47,072 --> 00:03:52,704
And are animation should still be working so if you put the animation you should so see a turning blue for a little bit when you play it
90
00:03:53,216 --> 00:03:55,264
Again you'll have to save the hip-hop dance
91
00:03:55,520 --> 00:03:57,568
First after you remove the closing share
92
00:03:58,080 --> 00:04:00,384
And then rename is closing shape 2D
93
00:04:00,640 --> 00:04:01,408
Collision shape 2
94
00:04:01,664 --> 00:04:04,736
To do the same thing in our enemy so
95
00:04:04,992 --> 00:04:11,136
We are going to go into the hot box component were going to cut this collision shape from the herb box component with
96
00:04:11,904 --> 00:04:13,696
Save that scene
97
00:04:13,952 --> 00:04:15,744
Go back over to a basic enemy
98
00:04:16,000 --> 00:04:18,047
Over the hurt box and press control
99
00:04:19,071 --> 00:04:24,447
And the reason why we did that is because we separated the collision shape definition from the compare
100
00:04:24,703 --> 00:04:25,215
Itself
101
00:04:25,471 --> 00:04:29,055
So now if we were to instantiate for instance by right click
102
00:04:30,591 --> 00:04:31,615
Airbus component
103
00:04:31,871 --> 00:04:33,663
We can supply a different shape
104
00:04:34,175 --> 00:04:35,711
So not locked into the show
105
00:04:35,967 --> 00:04:36,991
When we reuse
106
00:04:37,247 --> 00:04:38,015
Component across
107
00:04:38,527 --> 00:04:39,039
The game
108
00:04:39,295 --> 00:04:42,111
So the bulk of our work is going to be done in
109
00:04:42,623 --> 00:04:43,647
Hitbox compose
110
00:04:44,159 --> 00:04:46,463
So let's go ahead and add a script to the hitbox compound
111
00:04:46,719 --> 00:04:49,279
The default settings are fine like usual
112
00:04:49,535 --> 00:04:54,143
And the main thing I want to do here is first we're going to give it a class name so as to class name
113
00:04:54,911 --> 00:04:55,679
Hitbox
114
00:04:55,935 --> 00:04:56,447
Company
115
00:04:59,263 --> 00:05:02,335
Ok and then let's create a variable call
116
00:05:02,591 --> 00:05:04,895
Damage Emma going to set it to 0 by 2
117
00:05:05,919 --> 00:05:07,711
And I'm going to go to our sort of Billy
118
00:05:09,503 --> 00:05:11,295
What we're going to do with the sword ability
119
00:05:11,551 --> 00:05:14,111
Is we are going to add a
120
00:05:14,367 --> 00:05:14,879
To this
121
00:05:15,135 --> 00:05:15,647
Sorbillo
122
00:05:16,159 --> 00:05:17,695
So what's going on at the
123
00:05:17,951 --> 00:05:18,719
Just like normal
124
00:05:19,231 --> 00:05:21,023
We're gonna add class name
125
00:05:22,047 --> 00:05:23,583
Sword ability to this
126
00:05:24,863 --> 00:05:25,631
And we're going to do
127
00:05:25,887 --> 00:05:27,167
Add on read
128
00:05:27,935 --> 00:05:28,447
Via
129
00:05:28,959 --> 00:05:29,983
Hitbox component
130
00:05:32,031 --> 00:05:33,567
I'm going to type it as the hip
131
00:05:33,823 --> 00:05:36,639
This is why using the class name so we can type 2
132
00:05:37,151 --> 00:05:38,687
Is equal to dollar sign
133
00:05:38,943 --> 00:05:39,967
Pit bikes compare
134
00:05:40,735 --> 00:05:46,879
And then we have to go to the other layer which is the sword ability controller so let's do control
135
00:05:47,135 --> 00:05:47,903
How to quick open
136
00:05:48,415 --> 00:05:51,743
Sword ability controller is the one we want to open to go and search for
137
00:05:52,255 --> 00:05:52,767
Open app
138
00:05:53,279 --> 00:05:56,351
We already have a script here and sort to make a couple of minor chair
139
00:05:57,119 --> 00:06:01,983
So firstly we do want to have a damage variable in here as
140
00:06:02,751 --> 00:06:03,775
So let's Create
141
00:06:05,055 --> 00:06:06,847
Variable below the x
142
00:06:07,103 --> 00:06:08,127
Van Damme
143
00:06:08,895 --> 00:06:09,407
0
144
00:06:10,431 --> 00:06:12,991
Actually want to set this damage to something like
145
00:06:13,247 --> 00:06:14,783
+254 now
146
00:06:15,039 --> 00:06:17,343
Because our enemies well by the fault have it
147
00:06:17,599 --> 00:06:18,879
Tenzo this wall
148
00:06:19,135 --> 00:06:19,647
2 hits
149
00:06:19,903 --> 00:06:20,671
Secure
150
00:06:20,927 --> 00:06:22,719
Are basic enemy so Saturday
151
00:06:23,743 --> 00:06:26,047
And then on timer timer
152
00:06:26,303 --> 00:06:28,863
Let's look for where we are doing the sword instance
153
00:06:29,119 --> 00:06:30,911
So here where is Dan shooting the sword
154
00:06:31,167 --> 00:06:33,471
Let's Castle instead as a sword
155
00:06:33,983 --> 00:06:34,495
Ability
156
00:06:34,751 --> 00:06:36,543
And what that's going to do for us now
157
00:06:37,055 --> 00:06:40,127
Is that after we add a sword instance to the
158
00:06:40,383 --> 00:06:41,151
Players pair
159
00:06:41,663 --> 00:06:43,455
We can assign the damage
160
00:06:43,711 --> 00:06:44,223
And so
161
00:06:44,479 --> 00:06:46,015
What I'm going to do is I'm going to say
162
00:06:46,527 --> 00:06:48,063
Sword instant star
163
00:06:48,575 --> 00:06:49,855
Hitbox compound
164
00:06:50,111 --> 00:06:50,623
Dad
165
00:06:50,879 --> 00:06:51,391
Damage
166
00:06:52,415 --> 00:06:53,439
Is equal to
167
00:06:54,975 --> 00:06:57,023
So you can see why we set up a script for
168
00:06:57,279 --> 00:06:57,791
All this right
169
00:06:58,047 --> 00:07:00,863
So we still have a sword ability and we cast to the sword bill
170
00:07:01,375 --> 00:07:04,703
Why because we have hitbox component variable that we can
171
00:07:05,983 --> 00:07:08,031
I'm referencing and hitbox composed
172
00:07:08,543 --> 00:07:09,823
And I'm assigning the Dam
173
00:07:10,335 --> 00:07:11,103
So if I go to
174
00:07:11,359 --> 00:07:12,895
Hitbox component in here
175
00:07:13,151 --> 00:07:14,175
We've got a diamond
176
00:07:14,943 --> 00:07:20,319
So that's one piece of the puzzle so we've got her damaged flowing from our sword ability controller
177
00:07:20,575 --> 00:07:21,599
2 hour
178
00:07:22,111 --> 00:07:23,391
Sword ultimately
179
00:07:23,647 --> 00:07:25,439
Now in our basic enemy
180
00:07:25,695 --> 00:07:30,815
We want to click into the heart box component so let's open up that her box components seen
181
00:07:31,071 --> 00:07:34,399
From the basic enemy or you can open it by doing the quick search
182
00:07:35,167 --> 00:07:36,959
What's attach a script to this work
183
00:07:37,471 --> 00:07:39,775
And the default path is ok
184
00:07:40,031 --> 00:07:42,079
Again let's do a class name for this
185
00:07:42,335 --> 00:07:44,127
Class underscore name
186
00:07:44,383 --> 00:07:45,151
Hurt back
187
00:07:45,663 --> 00:07:46,175
Composed
188
00:07:46,687 --> 00:07:48,223
I think you're going to do here
189
00:07:48,479 --> 00:07:51,295
We're going to export so at x
190
00:07:52,063 --> 00:07:52,831
2 x 4
191
00:07:53,087 --> 00:07:53,599
Bar
192
00:07:53,855 --> 00:07:54,367
Hello
193
00:07:54,879 --> 00:07:56,159
Underscore component
194
00:07:58,463 --> 00:08:02,559
And I should note that I believe you're supposed to be able to do something
195
00:08:02,815 --> 00:08:03,327
Play Converse
196
00:08:03,583 --> 00:08:05,887
Export via health component health compound
197
00:08:06,143 --> 00:08:09,727
However you can see in my version of video that I'm using
198
00:08:09,983 --> 00:08:12,799
I cannot select that help component there
199
00:08:13,567 --> 00:08:14,079
So
200
00:08:14,335 --> 00:08:16,383
That's ok I'm just going to you
201
00:08:16,639 --> 00:08:17,919
Playing all night here
202
00:08:18,175 --> 00:08:20,223
Anyway we've got we're going to get a reference to
203
00:08:20,479 --> 00:08:22,527
Health component now in the
204
00:08:22,783 --> 00:08:24,063
Herb box component
205
00:08:24,319 --> 00:08:29,439
Animal we can do is weekend override the ready method so funk
206
00:08:29,695 --> 00:08:30,463
Score Reading
207
00:08:30,719 --> 00:08:31,743
And then we can say
208
00:08:31,999 --> 00:08:33,023
Ariel Winter
209
00:08:33,279 --> 00:08:36,351
Because this is a signal on area2d in work standing area
210
00:08:36,863 --> 00:08:37,375
Dart
211
00:08:37,631 --> 00:08:38,143
Connect
212
00:08:38,655 --> 00:08:39,423
On
213
00:08:39,935 --> 00:08:40,447
Area
214
00:08:41,727 --> 00:08:43,007
So let's go ahead into fine
215
00:08:43,263 --> 00:08:43,775
Funk
216
00:08:44,031 --> 00:08:45,311
On area and
217
00:08:47,359 --> 00:08:48,895
And the other area
218
00:08:49,151 --> 00:08:50,943
Is going to be of type area2d
219
00:08:51,455 --> 00:08:52,991
And we're going to do this
220
00:08:54,015 --> 00:08:54,527
Other
221
00:08:54,783 --> 00:08:55,807
Underscore error
222
00:08:56,319 --> 00:08:57,855
I actually want to say if not
223
00:08:58,367 --> 00:08:59,391
Are there area
224
00:08:59,647 --> 00:09:00,159
Is
225
00:09:00,671 --> 00:09:01,695
Hitbox component
226
00:09:02,463 --> 00:09:03,999
Then what we want to do
227
00:09:04,255 --> 00:09:06,303
Is we want to just return
228
00:09:06,559 --> 00:09:09,375
Ok so now we can grab the other area
229
00:09:09,631 --> 00:09:10,911
As a
230
00:09:11,679 --> 00:09:12,447
Pit bikes compare
231
00:09:12,703 --> 00:09:16,799
So we can do with our hitbox component is he go to other area as
232
00:09:17,055 --> 00:09:17,567
Skip
233
00:09:18,335 --> 00:09:20,895
Component and now what we can do
234
00:09:21,151 --> 00:09:23,455
Is we can take the damage from the hip
235
00:09:23,711 --> 00:09:26,783
Check in here as well and we're going to same
236
00:09:27,295 --> 00:09:27,807
If
237
00:09:28,063 --> 00:09:28,575
Health
238
00:09:28,831 --> 00:09:29,599
Component
239
00:09:30,111 --> 00:09:31,391
Is equal to now
240
00:09:31,903 --> 00:09:34,207
Organ to return out of this as well
241
00:09:34,463 --> 00:09:34,975
Ok
242
00:09:35,231 --> 00:09:37,791
So now we've got those safety checks in place
243
00:09:38,047 --> 00:09:43,679
Now we're dealing with a collision that came from a hitbox component remember the hitbox component is of
244
00:09:43,935 --> 00:09:46,751
Area2d as well and so that's why this is going away
245
00:09:47,263 --> 00:09:49,567
And all we can do is we can take it the health component
246
00:09:50,079 --> 00:09:51,103
Dot damage
247
00:09:51,615 --> 00:09:54,687
And when I going to get the autocomplete because
248
00:09:55,199 --> 00:09:55,711
This
249
00:09:55,967 --> 00:09:58,527
Is believed by kaido to be a type of nose
250
00:09:58,783 --> 00:10:00,588
But we can pull up our
251
00:10:00,589 --> 00:10:02,760
Subtitled by
online-courses.club
We compress knowledge for you!
252
00:10:02,761 --> 00:10:02,111
Health component
253
00:10:02,367 --> 00:10:04,671
And open up that script and we can see
254
00:10:04,927 --> 00:10:10,815
That we have a damage function so will still be all the call it despite the fact I could do is not giving us the autocomplete suggestion
255
00:10:11,327 --> 00:10:15,679
So how's component damage and we're going to grab the damage of the hitbox component
256
00:10:16,447 --> 00:10:17,215
Just like that
257
00:10:17,471 --> 00:10:19,519
So now we have closed
258
00:10:20,031 --> 00:10:21,567
The damage has been
259
00:10:22,079 --> 00:10:23,871
From the sword ability controllers
260
00:10:24,127 --> 00:10:24,639
Define here
261
00:10:25,663 --> 00:10:26,687
It's been past
262
00:10:27,199 --> 00:10:30,015
In the other sword instance hitbox compound
263
00:10:30,271 --> 00:10:31,807
Were signing the damage here
264
00:10:32,063 --> 00:10:33,343
On the box component
265
00:10:33,599 --> 00:10:35,135
So that looks like
266
00:10:35,391 --> 00:10:36,159
This
267
00:10:36,415 --> 00:10:38,207
So we've got our hitbox component here
268
00:10:38,463 --> 00:10:40,511
As a reference so that we can set the date
269
00:10:41,023 --> 00:10:44,095
When a hip-hop component collides with h
270
00:10:44,351 --> 00:10:47,935
Letterbox component which I will open now with ctrl shift l
271
00:10:48,191 --> 00:10:53,311
We're going to check first of all if the area coming into our her box is
272
00:10:53,567 --> 00:10:56,127
A type of hitbox component if it is
273
00:10:56,383 --> 00:10:58,431
And we have a reference to the health component
274
00:10:58,687 --> 00:11:00,223
They were going to go ahead into your Devon
275
00:11:00,735 --> 00:11:05,343
And so now what we should see is that the enemies will not die instantly because we doing 5 damage
276
00:11:05,599 --> 00:11:06,367
Hit them
277
00:11:06,623 --> 00:11:08,159
Instead it should take two hits and
278
00:11:08,927 --> 00:11:09,951
Let's go out and see if that
279
00:11:10,463 --> 00:11:11,999
And we got a crash
280
00:11:12,511 --> 00:11:14,815
And that's because I failed to update
281
00:11:15,071 --> 00:11:16,863
My basic enemy script
282
00:11:17,887 --> 00:11:18,655
This is going to be
283
00:11:18,911 --> 00:11:21,471
Pretty easy we just need to actually tear out
284
00:11:21,727 --> 00:11:22,239
This
285
00:11:22,495 --> 00:11:23,775
So we got a basic anime
286
00:11:24,031 --> 00:11:26,847
When I using the herb box component to handle the damage
287
00:11:27,103 --> 00:11:27,871
An equation
288
00:11:28,127 --> 00:11:29,663
So we actually don't need a handle
289
00:11:29,919 --> 00:11:31,967
Any of this in the basic enemy
290
00:11:32,479 --> 00:11:35,039
So go ahead and open up your basic enemies
291
00:11:35,295 --> 00:11:38,879
By clicking the Script button we can get rid of the ready method
292
00:11:39,135 --> 00:11:41,951
I'm also going to go ahead and get rid of this comment while I'm here
293
00:11:42,207 --> 00:11:44,255
And we can get rid of this on area entered
294
00:11:44,767 --> 00:11:48,095
And so we should be good to go now so I'm going to go ahead and
295
00:11:48,351 --> 00:11:50,911
Run the game in actually there is one more thing we need to do
296
00:11:51,167 --> 00:11:52,447
We need to set up
297
00:11:52,703 --> 00:11:56,543
In her back support the basic anyway we need to put the health component referencing
298
00:11:57,055 --> 00:11:59,871
So so like The Hurt Locker part drag the health component in
299
00:12:00,127 --> 00:12:01,919
And now everything should be
300
00:12:02,175 --> 00:12:03,199
Let's go home
301
00:12:03,711 --> 00:12:04,991
So we should be two hits on
302
00:12:05,503 --> 00:12:06,015
1
303
00:12:07,807 --> 00:12:13,951
And they're gone so we have damaged so if your enemies are dying in two hits and you can figure it out the damage the same as me
304
00:12:14,207 --> 00:12:17,023
Then you should see this behaviour
305
00:12:17,279 --> 00:12:17,791
Exactly
306
00:12:18,047 --> 00:12:20,095
So now we have a proper Foundation
307
00:12:20,351 --> 00:12:21,119
For handling
308
00:12:21,375 --> 00:12:22,911
Ability upgrades
20903
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.