All language subtitles for 39. Adding a Wizard Enemy

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian Download
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian Download
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
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:02,304 Let's create a new enemy type 2 00:00:02,560 --> 00:00:04,608 To add some variety to the game 3 00:00:04,864 --> 00:00:11,008 But also to provide us with the ability to increase the difficulty as 4 00:00:11,264 --> 00:00:12,032 Game goes on 5 00:00:12,544 --> 00:00:15,616 So once we implement this enemy type were going to 6 00:00:15,872 --> 00:00:16,384 2 7 00:00:16,640 --> 00:00:22,016 Amend our enemy manager so that it starts spawning the new anime type 8 00:00:22,272 --> 00:00:24,064 As we get into the game 9 00:00:24,576 --> 00:00:28,416 So go ahead and go to York any assets your child 10 00:00:28,672 --> 00:00:30,720 And let's open up tilemap pack 11 00:00:31,232 --> 00:00:35,584 Hairlicious take a look and see what enemies we want to introduce now 12 00:00:35,840 --> 00:00:39,680 We probably should use an enemy that is slightly different than the right 13 00:00:40,192 --> 00:00:42,240 So I'm thinking either 14 00:00:42,752 --> 00:00:46,336 The spider or the dark wizard here I think the dark wizard would be 15 00:00:46,592 --> 00:00:47,616 Find Dad 16 00:00:47,872 --> 00:00:49,152 So let's choose 17 00:00:49,408 --> 00:00:50,688 This guy right here 18 00:00:51,968 --> 00:00:57,088 I'm going to go to the individual tiles directory and I'm going to scroll down until I 19 00:00:57,344 --> 00:00:58,112 Find him 20 00:00:58,368 --> 00:00:59,136 There's the wizard 21 00:00:59,392 --> 00:01:01,421 Ok so that wizard is tile 011 22 00:01:01,423 --> 00:01:03,899 Subtitled by online-courses.club We compress knowledge for you! 23 00:01:03,900 --> 00:01:04,768 1.png 24 00:01:05,024 --> 00:01:08,096 Win a drag that over into the file system in Cadell 25 00:01:08,608 --> 00:01:10,400 And I'm going to rename this to 26 00:01:12,448 --> 00:01:13,216 Wizard 27 00:01:13,472 --> 00:01:14,496 Underscore 28 00:01:16,032 --> 00:01:17,824 Ok and then under scenes 29 00:01:18,080 --> 00:01:19,360 And then game object 30 00:01:19,616 --> 00:01:22,176 Let's create a new folder under 31 00:01:22,432 --> 00:01:24,224 And call it wizard 32 00:01:24,736 --> 00:01:27,808 Underscore Enemy At The End just to be 33 00:01:28,064 --> 00:01:30,624 Consistent with the basic enemy that we've got 34 00:01:31,136 --> 00:01:34,208 Drag that wizard png into that wizard 35 00:01:34,720 --> 00:01:35,488 Just like so 36 00:01:36,000 --> 00:01:37,536 And then hit control and 37 00:01:37,792 --> 00:01:39,584 Make it route type of military 38 00:01:40,096 --> 00:01:41,632 Going to call this wizard 39 00:01:42,400 --> 00:01:42,912 Anime 40 00:01:43,424 --> 00:01:45,728 Then go ahead and save that with control as 41 00:01:45,984 --> 00:01:47,264 Inside of scenes 42 00:01:47,520 --> 00:01:48,288 Game ABT 43 00:01:48,800 --> 00:01:49,568 Wizard enemy 44 00:01:50,848 --> 00:01:56,992 Alright lads had control a and search for Sprite 2D we're going bad is right to die 45 00:01:57,248 --> 00:02:00,064 Which is going to have a texture of The Wizard 46 00:02:00,576 --> 00:02:01,088 Png 47 00:02:01,856 --> 00:02:02,368 And then 48 00:02:02,624 --> 00:02:03,904 Go to the office 49 00:02:04,160 --> 00:02:04,672 Why 50 00:02:04,928 --> 00:02:05,952 Hold control 51 00:02:06,464 --> 00:02:08,000 And let's offset 52 00:02:08,256 --> 00:02:08,768 That 53 00:02:09,024 --> 00:02:09,536 Bye 54 00:02:09,792 --> 00:02:12,608 Holding the left Mouse button down and outfield 55 00:02:12,864 --> 00:02:14,400 And moving the mouse to the left 56 00:02:14,912 --> 00:02:18,752 And an officer of -8 in white put the origin 57 00:02:19,008 --> 00:02:20,544 Of the Sprite ad 58 00:02:20,800 --> 00:02:21,312 The fee 59 00:02:21,824 --> 00:02:24,640 So that's going to be good for our purposes 60 00:02:24,896 --> 00:02:28,480 And then let's go ahead and institute of child seeing we want to instantiate 61 00:02:28,992 --> 00:02:30,016 The health 62 00:02:30,784 --> 00:02:34,880 And let me go to the basic enemy seem so ctrl shift o 63 00:02:35,136 --> 00:02:36,416 Search for basic enemy 64 00:02:36,672 --> 00:02:38,208 This health component is 65 00:02:38,464 --> 00:02:38,976 The default 66 00:02:39,232 --> 00:02:39,744 At 10 67 00:02:40,000 --> 00:02:43,072 In so what I'm going to do is I'm going to 68 00:02:44,096 --> 00:02:46,400 Pampers maxol at maybe do something like 69 00:02:46,912 --> 00:02:48,448 Animal it's just write 30 70 00:02:49,216 --> 00:02:51,520 And I move his health component up to be the first child 71 00:02:52,032 --> 00:02:53,568 So I set the max health to be 72 00:02:53,824 --> 00:02:54,336 30 73 00:02:54,592 --> 00:02:56,896 And then let's go head in Standish 74 00:02:57,152 --> 00:02:59,712 The death component underneath this 75 00:02:59,968 --> 00:03:02,016 I move that below the health component 76 00:03:02,272 --> 00:03:05,856 And then I dragged the health component node into that health compare 77 00:03:06,112 --> 00:03:06,624 Property 78 00:03:06,880 --> 00:03:08,416 An Ender Dragon sprite 79 00:03:08,672 --> 00:03:09,184 Into the Dead 80 00:03:09,440 --> 00:03:09,952 Spray 81 00:03:12,512 --> 00:03:18,144 Ok so we need to look at our basic enemy we also need to add a hurtbox compose 82 00:03:18,400 --> 00:03:18,912 And 83 00:03:19,168 --> 00:03:21,984 And we need to make this wizard anime a based 84 00:03:22,240 --> 00:03:23,520 Of character body to die 85 00:03:23,776 --> 00:03:24,288 So 86 00:03:24,544 --> 00:03:25,824 We made a mistake here 87 00:03:26,080 --> 00:03:26,848 And that's fine 88 00:03:27,104 --> 00:03:30,176 Because what we can do as we can right click on the root note 89 00:03:30,432 --> 00:03:32,224 And then we can say change type 90 00:03:33,248 --> 00:03:34,016 And then we can 91 00:03:34,272 --> 00:03:35,552 The character body 2D 92 00:03:35,808 --> 00:03:37,856 And our issue is fixed 93 00:03:38,112 --> 00:03:40,416 So you can always change the root type if you want 94 00:03:40,672 --> 00:03:44,512 Ok so now we need to add a collision shape which represents 95 00:03:45,792 --> 00:03:48,096 The shape that will collide with the train 96 00:03:48,352 --> 00:03:51,168 And in our ship resource let's create a new circle 97 00:03:51,680 --> 00:03:56,544 And lead set the radius down of that to something like 6 by clicking into that circle 98 00:03:56,800 --> 00:03:58,336 An access 24 99 00:03:58,592 --> 00:03:59,616 Yes and then 100 00:03:59,872 --> 00:04:04,736 I'm going to hit w on the keyboard and just drive this up until the bottom of the circle 101 00:04:04,992 --> 00:04:06,784 Is just touching the origin just like that 102 00:04:07,040 --> 00:04:07,552 Ok 103 00:04:07,808 --> 00:04:10,112 Click on the wizard anime l modified 104 00:04:10,368 --> 00:04:10,880 The 105 00:04:11,136 --> 00:04:12,928 Collision layers in the collision 106 00:04:13,184 --> 00:04:17,280 So we don't want us to exist on a layer something uncheck that layer bit right there 107 00:04:17,536 --> 00:04:19,839 Animal leave masks at 21 108 00:04:20,095 --> 00:04:21,375 Which is the train 109 00:04:21,631 --> 00:04:22,143 Leia 110 00:04:22,399 --> 00:04:25,727 Ok let's instantiated another child seen in going to call this 111 00:04:25,983 --> 00:04:27,263 Perkbox components 112 00:04:27,519 --> 00:04:29,567 Instantiate a hurtbox component 113 00:04:30,335 --> 00:04:31,359 And then 114 00:04:31,615 --> 00:04:37,759 I'm going to put this above that collision shape 2D and then I'm going to add as a child another 115 00:04:38,015 --> 00:04:38,783 Shape 2D 116 00:04:40,575 --> 00:04:41,599 Just like so 117 00:04:41,855 --> 00:04:42,879 And then we're going to cream 118 00:04:43,135 --> 00:04:44,927 Again another circle shape 119 00:04:45,183 --> 00:04:47,487 Let's move this hurt backs can't 120 00:04:47,743 --> 00:04:48,767 By selecting 121 00:04:49,023 --> 00:04:50,303 Sitting w on the keyboard 122 00:04:50,815 --> 00:04:53,119 And then dragging clicking and dragging this 123 00:04:53,375 --> 00:04:55,423 Into roughly the centre of the wizard 124 00:04:55,679 --> 00:04:57,727 And I'm going back to the heart box compare 125 00:04:57,983 --> 00:04:58,495 Collision 126 00:04:58,751 --> 00:05:00,287 Opening of the shape resource 127 00:05:00,543 --> 00:05:01,823 What's at the 128 00:05:02,079 --> 00:05:02,847 Radius to 8 129 00:05:03,359 --> 00:05:04,383 Yeah I think that's going 130 00:05:04,639 --> 00:05:05,151 Just 131 00:05:05,407 --> 00:05:05,919 Fine 132 00:05:07,199 --> 00:05:13,343 So let's go back to a basic enemy and let's open up the script and see what kind of b 133 00:05:15,391 --> 00:05:17,951 We have a very basic behaviour set 134 00:05:18,207 --> 00:05:18,719 I'm here 135 00:05:19,231 --> 00:05:22,047 Which is basically just moving towards a player at a 136 00:05:22,303 --> 00:05:23,071 Givenchy 137 00:05:23,583 --> 00:05:27,935 Rather than duplicated code I'm going to show you how we can 138 00:05:28,191 --> 00:05:30,751 Make our movement code 139 00:05:31,007 --> 00:05:31,519 Genera 140 00:05:31,775 --> 00:05:34,335 And we're actually going to create another component for this 141 00:05:34,847 --> 00:05:36,383 So let's take control in 142 00:05:36,639 --> 00:05:39,455 And if that's not working it's probably because 143 00:05:39,711 --> 00:05:40,479 You have 144 00:05:40,735 --> 00:05:42,271 The Script editor 145 00:05:42,527 --> 00:05:43,039 Contact 146 00:05:43,551 --> 00:05:45,343 So always make sure that 147 00:05:45,599 --> 00:05:47,647 One of these panels is in context 148 00:05:47,903 --> 00:05:48,415 By clicking 149 00:05:48,927 --> 00:05:50,207 Before you hit ctrl n 150 00:05:50,463 --> 00:05:52,511 Anna let's Create the root type of 151 00:05:53,023 --> 00:05:53,535 Note 152 00:05:53,791 --> 00:05:55,583 And it's called this velocity 153 00:05:58,143 --> 00:06:00,703 And I'm gonna go kind of fast food this but I am go 154 00:06:01,215 --> 00:06:01,727 Wayne 155 00:06:01,983 --> 00:06:03,775 What I'm doing to the best of my ability so 156 00:06:04,031 --> 00:06:04,543 Let's 157 00:06:04,799 --> 00:06:05,567 Go 158 00:06:05,823 --> 00:06:07,871 And save this in our scenes 159 00:06:08,127 --> 00:06:10,687 Component directory alongside of our other components 160 00:06:10,943 --> 00:06:11,967 And I'm going out Ace 161 00:06:12,735 --> 00:06:14,527 Default parameters are ok 162 00:06:14,783 --> 00:06:17,855 We're going to create an export variable export via 163 00:06:18,111 --> 00:06:19,903 Max underscore speed 164 00:06:20,159 --> 00:06:21,439 And this is going to be of type 165 00:06:22,207 --> 00:06:22,975 Result of 166 00:06:23,999 --> 00:06:25,279 OK then let's 167 00:06:25,535 --> 00:06:26,303 Create a 168 00:06:26,559 --> 00:06:27,071 Function 169 00:06:27,583 --> 00:06:28,095 Funk 170 00:06:28,351 --> 00:06:28,863 Move 171 00:06:29,119 --> 00:06:31,935 And it's going to accept an argument of caribou 172 00:06:32,447 --> 00:06:33,727 And then that's going to be uptight 173 00:06:33,983 --> 00:06:34,751 Character 174 00:06:35,775 --> 00:06:39,615 Ok and say what we're going to do is we're just gonna right past right here 175 00:06:39,871 --> 00:06:42,431 Because we need to keep track of a variable 176 00:06:42,687 --> 00:06:43,711 Simon save our 177 00:06:43,967 --> 00:06:44,735 Lhasa 178 00:06:45,503 --> 00:06:46,015 Is eager 179 00:06:46,783 --> 00:06:48,063 Vector2 180 00:06:48,319 --> 00:06:48,831 0 181 00:06:49,855 --> 00:06:50,623 Let's Create 182 00:06:50,879 --> 00:06:52,671 Another function in here 183 00:06:53,951 --> 00:06:55,743 I'm going to call it accelerate 184 00:06:55,999 --> 00:06:57,279 In Direction 185 00:06:57,791 --> 00:07:00,351 And our Direction is going to be 186 00:07:00,607 --> 00:07:01,375 Type 187 00:07:01,631 --> 00:07:02,143 2 188 00:07:02,399 --> 00:07:03,167 That's right path 189 00:07:03,935 --> 00:07:05,215 So the way that we're going to use it 190 00:07:05,471 --> 00:07:11,103 Is we're going to be able to manipulate this internal velocity by cooling Accelerate indirect 191 00:07:11,615 --> 00:07:14,687 And then we're going to be able to move the character by calling the smooth 192 00:07:15,455 --> 00:07:16,735 Now why is 193 00:07:16,991 --> 00:07:20,319 Is this good well if I go back to my basic enemies 194 00:07:20,831 --> 00:07:22,111 Hear what I can do 195 00:07:22,367 --> 00:07:23,647 Essentially is I can 196 00:07:24,159 --> 00:07:26,975 Manipulate the velocity and comoving slide 197 00:07:27,231 --> 00:07:27,999 From within 198 00:07:28,511 --> 00:07:29,023 This 199 00:07:29,535 --> 00:07:30,559 Component here 200 00:07:30,815 --> 00:07:32,607 So I don't have to keep doing 201 00:07:32,863 --> 00:07:34,399 The same code over and over again 202 00:07:34,911 --> 00:07:35,935 Also going to 203 00:07:36,191 --> 00:07:39,007 Prove our ability to control 204 00:07:39,263 --> 00:07:40,543 How enemies move 205 00:07:40,799 --> 00:07:42,591 By utilising this accelerate 206 00:07:44,127 --> 00:07:49,247 Now we'll probably also going to want another function so let's stop this out I'm going to create another function call 207 00:07:49,759 --> 00:07:51,295 Bank accelerate 208 00:07:52,063 --> 00:07:52,575 2 209 00:07:52,831 --> 00:07:53,343 Claire 210 00:07:53,855 --> 00:07:55,391 Endless pass in 211 00:07:55,647 --> 00:07:56,671 Well we'll keep 212 00:07:56,927 --> 00:07:58,975 So what does keep no arguments 213 00:07:59,231 --> 00:08:01,279 Ok so the first thing that we want to do 214 00:08:01,535 --> 00:08:03,071 Is we want to say 215 00:08:03,583 --> 00:08:04,095 The Folly 216 00:08:04,607 --> 00:08:06,911 We want to say in our acceleration Direction 217 00:08:07,167 --> 00:08:08,959 Scrap our desired velocity 218 00:08:10,495 --> 00:08:11,775 And what is are desirable 219 00:08:12,031 --> 00:08:13,567 It's going to be the direction 220 00:08:13,823 --> 00:08:15,359 That were passing into the funk 221 00:08:16,127 --> 00:08:16,895 X 222 00:08:17,151 --> 00:08:18,175 Power maths 223 00:08:18,431 --> 00:08:18,943 Speed 224 00:08:19,199 --> 00:08:22,015 Right so this is the final velocity that we want 225 00:08:22,271 --> 00:08:22,783 Tube 226 00:08:23,807 --> 00:08:26,367 Then what we're going to do is we are going to 227 00:08:26,623 --> 00:08:27,647 Accelerate 228 00:08:28,159 --> 00:08:29,183 The current velocity 229 00:08:30,463 --> 00:08:31,487 That desire 230 00:08:32,767 --> 00:08:33,791 So what we can do 231 00:08:34,047 --> 00:08:34,815 This we can say 232 00:08:35,071 --> 00:08:35,839 Velocity 233 00:08:36,095 --> 00:08:38,143 Remember this is our internal velocity 234 00:08:38,655 --> 00:08:39,423 Is equal to 235 00:08:40,191 --> 00:08:40,959 Velocity 236 00:08:41,471 --> 00:08:41,983 Start 237 00:08:42,239 --> 00:08:44,031 Look up and we want to live 238 00:08:44,287 --> 00:08:46,591 Which is linear interpolate 2 / 4 239 00:08:46,847 --> 00:08:50,175 I'm not going to use that framerate independent that we talk to you 240 00:08:50,687 --> 00:08:52,735 So this is going to be 1 - 241 00:08:54,783 --> 00:08:59,135 And then this is going to be some smoothing value so we'll say 242 00:08:59,391 --> 00:09:00,415 What's a neg 243 00:09:00,671 --> 00:09:01,439 Acceleration 244 00:09:01,951 --> 00:09:02,463 X 245 00:09:02,975 --> 00:09:03,999 And then we can use this 246 00:09:04,255 --> 00:09:05,535 Get process 247 00:09:07,327 --> 00:09:08,863 Ok so they don't want to break down 248 00:09:09,375 --> 00:09:10,655 Before I break this down 249 00:09:10,911 --> 00:09:12,703 Let's Create another export variable 250 00:09:12,959 --> 00:09:13,983 Blow the man 251 00:09:14,751 --> 00:09:17,823 Speed and call it via acceleration 252 00:09:18,591 --> 00:09:20,127 And put a float 253 00:09:21,663 --> 00:09:23,455 Ok so now alright should go away 254 00:09:23,967 --> 00:09:24,479 So what do we do 255 00:09:24,735 --> 00:09:27,039 Were using the linear interpolate which again 256 00:09:27,295 --> 00:09:28,063 Take away 257 00:09:28,575 --> 00:09:30,111 Which is what we're calculating here 258 00:09:30,367 --> 00:09:33,951 And says I want to go this percent of the way 259 00:09:34,463 --> 00:09:35,231 Sward 260 00:09:35,743 --> 00:09:36,255 This 261 00:09:36,511 --> 00:09:37,279 Supplied 262 00:09:38,047 --> 00:09:40,607 So we're going to essentially go from my current velocity 263 00:09:40,863 --> 00:09:42,399 To the desired velocity 264 00:09:43,423 --> 00:09:44,447 This person 265 00:09:44,703 --> 00:09:45,471 Everything 266 00:09:45,983 --> 00:09:47,519 Now if we were to put something 267 00:09:47,775 --> 00:09:48,799 Point one in here 268 00:09:49,055 --> 00:09:50,847 We would say every frame 269 00:09:51,103 --> 00:09:51,615 Ten percent 270 00:09:51,871 --> 00:09:52,383 Closer 271 00:09:52,639 --> 00:09:53,407 To the desirable 272 00:09:53,919 --> 00:09:55,199 Now this is 273 00:09:55,455 --> 00:09:57,503 10% according to the current 274 00:09:57,759 --> 00:10:00,588 So you may notice if you're familiar with mass 275 00:10:00,589 --> 00:10:02,760 Subtitled by online-courses.club We compress knowledge for you! 276 00:10:02,761 --> 00:10:02,623 This is essentially an asymptote 277 00:10:02,879 --> 00:10:04,415 Basically what's going to happen is it 278 00:10:04,671 --> 00:10:06,975 Get 10% closer to your goal 279 00:10:07,231 --> 00:10:08,255 Every frame 280 00:10:08,511 --> 00:10:10,303 You're actually going to a pro 281 00:10:10,559 --> 00:10:14,399 But never reach the desired velocity now in practical terms that Jacqueline 282 00:10:14,655 --> 00:10:16,447 The case but in mathematics 283 00:10:16,959 --> 00:10:17,727 Dad's 284 00:10:19,263 --> 00:10:20,031 Insole 285 00:10:20,287 --> 00:10:22,335 We don't want to provide a fixed value girl 286 00:10:22,591 --> 00:10:23,359 10% 287 00:10:23,615 --> 00:10:28,223 And the reason is because if you have a user running at 400 frames per 288 00:10:28,479 --> 00:10:32,831 They're going to be going 10% closer to their goal every single frame 289 00:10:33,087 --> 00:10:33,599 Rainbow 290 00:10:34,111 --> 00:10:35,647 And if you have a user 291 00:10:35,903 --> 00:10:38,207 Playing at 10 frames per second we hope that 292 00:10:38,463 --> 00:10:39,743 Happen but if you have another player 293 00:10:39,999 --> 00:10:41,279 Going at 10 frames per sec 294 00:10:41,535 --> 00:10:43,839 They are going to arrive at the goal match Slough 295 00:10:44,351 --> 00:10:45,887 Right it's all because 296 00:10:46,143 --> 00:10:47,423 There can be different framerate 297 00:10:47,935 --> 00:10:48,703 We want to 298 00:10:49,727 --> 00:10:52,031 Introduced an early release 299 00:10:52,287 --> 00:10:53,567 And basically we do 300 00:10:53,823 --> 00:10:55,103 Is we take 1 - 301 00:10:55,615 --> 00:10:56,895 And I like to use x 302 00:10:57,151 --> 00:10:57,663 Energy 303 00:10:57,919 --> 00:11:00,223 The only reason I'm using that is because it provides a 304 00:11:00,479 --> 00:11:02,527 What about moral and natural feel too 305 00:11:02,783 --> 00:11:05,087 And then we're supplying a 306 00:11:05,343 --> 00:11:06,623 A power to raise 307 00:11:06,879 --> 00:11:07,647 To which is 308 00:11:08,159 --> 00:11:09,439 Some smoothing 309 00:11:09,951 --> 00:11:11,231 Which is our negative 310 00:11:12,767 --> 00:11:14,303 Get-process deltatime 311 00:11:14,559 --> 00:11:15,071 I'm here 312 00:11:15,327 --> 00:11:19,423 Will give you the value of Delta that is typically passed into 313 00:11:19,679 --> 00:11:21,215 The process function here 314 00:11:21,471 --> 00:11:22,751 This Delta 315 00:11:23,775 --> 00:11:24,543 This Delta 316 00:11:24,799 --> 00:11:26,079 Are going to be the same 317 00:11:26,335 --> 00:11:28,127 As long as they are 318 00:11:28,383 --> 00:11:28,895 Run 319 00:11:29,151 --> 00:11:29,663 In the 320 00:11:30,943 --> 00:11:32,223 Ok let's apply 321 00:11:32,479 --> 00:11:37,087 Or supply whether a default acceleration value by giving it -5 322 00:11:37,343 --> 00:11:38,367 Anna let's say them 323 00:11:38,623 --> 00:11:39,647 Speed is equal to 324 00:11:39,903 --> 00:11:42,719 14 actually sorry this is not supposed to be negative here that 325 00:11:43,487 --> 00:11:45,279 5 because we're not getting it 326 00:11:46,303 --> 00:11:49,375 SO53 acceleration and max speed of 40 327 00:11:49,631 --> 00:11:50,143 As a 328 00:11:50,911 --> 00:11:52,703 And you can see all these defaults appear now 329 00:11:52,959 --> 00:11:54,495 My inspector be careful 330 00:11:55,263 --> 00:11:57,055 Calculator.net 331 00:11:57,567 --> 00:11:59,103 And then in our move function 332 00:11:59,359 --> 00:12:03,455 Working a pass in a character body that we want to move and it's actually going to do is going to say 333 00:12:03,967 --> 00:12:04,991 Character body 334 00:12:05,247 --> 00:12:07,039 Velocity is equal to velocity 335 00:12:07,551 --> 00:12:08,575 Then we can call 336 00:12:08,831 --> 00:12:09,599 Character body 337 00:12:09,855 --> 00:12:10,367 Darton 338 00:12:10,623 --> 00:12:11,647 Moving slide 339 00:12:11,903 --> 00:12:13,951 And then we need to re assign our Velocity 340 00:12:15,231 --> 00:12:16,255 So that we can 341 00:12:16,511 --> 00:12:17,535 Say update 342 00:12:17,791 --> 00:12:19,583 The character bodies last Eso 343 00:12:19,839 --> 00:12:20,863 Breaking this down 344 00:12:21,119 --> 00:12:24,703 We're assigning the CO2 by blasty to articulated velocity 345 00:12:24,959 --> 00:12:26,495 That's internally stored here 346 00:12:26,751 --> 00:12:30,591 Were telling the truth about it to move and slide and again moving slide 347 00:12:30,847 --> 00:12:33,663 Returns the remaining velocity after 348 00:12:33,919 --> 00:12:34,943 Collision and then 349 00:12:35,199 --> 00:12:37,503 Because that happening internal 350 00:12:37,759 --> 00:12:38,527 The character body 351 00:12:38,783 --> 00:12:41,855 What is not being updated in our Velocity 352 00:12:42,111 --> 00:12:45,439 We just simply reassign our current velocity 353 00:12:45,695 --> 00:12:47,999 To whatever the character body 354 00:12:48,511 --> 00:12:50,047 Is after moving slow 355 00:12:50,303 --> 00:12:51,327 Celtic 356 00:12:51,583 --> 00:12:53,631 Doesn't collide with anything at removing slide 357 00:12:54,143 --> 00:12:54,655 Then 358 00:12:54,911 --> 00:12:57,215 These this last should be the same as the 359 00:12:58,495 --> 00:13:00,031 Hopefully that all makes sense 360 00:13:00,543 --> 00:13:03,615 And then let's do one final one which is accelerate 361 00:13:03,871 --> 00:13:04,639 Two player 362 00:13:04,895 --> 00:13:06,687 So what we going to do is going to say 363 00:13:06,943 --> 00:13:07,711 Bar 364 00:13:07,967 --> 00:13:10,271 What's a owner no to die 365 00:13:10,783 --> 00:13:13,343 Is equal to owner as no Genie 366 00:13:14,623 --> 00:13:15,903 And then we're going to say 367 00:13:16,159 --> 00:13:17,951 Owner node 2D is 368 00:13:19,231 --> 00:13:20,511 Then we're just going to return 369 00:13:22,559 --> 00:13:23,071 Function 370 00:13:23,583 --> 00:13:28,959 And the reason were driving the owner as a note to die is because we want to do the follow 371 00:13:29,215 --> 00:13:30,239 We want to say 372 00:13:31,519 --> 00:13:35,615 We want to grab the players position solovar player is equal to get 3 373 00:13:35,871 --> 00:13:37,663 Get first node in 374 00:13:38,175 --> 00:13:38,687 Claire 375 00:13:38,943 --> 00:13:42,015 Claire is equal to null will just return 376 00:13:42,271 --> 00:13:45,343 Ok and now we can calculate our directions save our Direction 377 00:13:45,855 --> 00:13:50,207 Is equal to now remember when you want to calculate Direction into vector some track 378 00:13:50,719 --> 00:13:51,231 But 379 00:13:52,255 --> 00:13:53,279 The vector that you were 380 00:13:53,535 --> 00:13:54,303 The point tour 381 00:13:54,559 --> 00:13:55,071 Goes 382 00:13:55,839 --> 00:13:58,399 So this could be player.dat global position 383 00:13:59,935 --> 00:14:00,703 - 384 00:14:01,215 --> 00:14:01,727 Moana 385 00:14:02,239 --> 00:14:03,775 No Judy make sure to you 386 00:14:04,031 --> 00:14:05,311 Owner no today 387 00:14:06,079 --> 00:14:07,359 Global position 388 00:14:07,615 --> 00:14:09,919 And we want to normalise this song 389 00:14:10,175 --> 00:14:10,943 We're going to 390 00:14:11,199 --> 00:14:14,015 Apprentice eyes that operation in then called that 391 00:14:14,527 --> 00:14:15,295 Normal eye 392 00:14:19,135 --> 00:14:23,743 And remember that the reason that we want a normalize a vector is because it returns a 393 00:14:23,999 --> 00:14:25,535 Unit vector a vector of 394 00:14:25,791 --> 00:14:26,815 One or mag 395 00:14:27,839 --> 00:14:28,607 Sufferance 396 00:14:28,863 --> 00:14:30,655 If I want to make a line 397 00:14:31,167 --> 00:14:32,703 Pointing in a certain Direction 398 00:14:34,495 --> 00:14:37,055 If I multiply that by a vector 399 00:14:37,311 --> 00:14:37,823 Hasn't 400 00:14:38,079 --> 00:14:40,127 2 then I'll actually end up with 401 00:14:42,687 --> 00:14:46,783 And I don't want that so normalisation make sure that my vector my Direction 402 00:14:47,039 --> 00:14:51,135 Has a length of 1 so that when I do multiplication operations on 403 00:14:51,391 --> 00:14:53,439 It returns the result that I'm 404 00:14:53,951 --> 00:14:56,255 So we normalise that and then we're going to do 405 00:14:56,767 --> 00:14:59,071 Call Accelerate in Direction 406 00:14:59,583 --> 00:15:00,095 With 407 00:15:00,351 --> 00:15:00,863 Supplied 408 00:15:01,375 --> 00:15:04,447 So this is essentially a helper function that would just look into 409 00:15:04,703 --> 00:15:05,471 This funk 410 00:15:05,727 --> 00:15:07,263 I'm here to update 411 00:15:07,775 --> 00:15:10,847 Ok so we've got our belasi component build out 412 00:15:11,871 --> 00:15:13,407 Before we go back to her 413 00:15:13,663 --> 00:15:14,175 Let's 414 00:15:14,431 --> 00:15:16,223 Go to our first and we that we created 415 00:15:16,479 --> 00:15:18,527 Let's instantiated veloci 416 00:15:19,807 --> 00:15:20,575 Drag it up 417 00:15:20,831 --> 00:15:24,159 Around the default values here should be fine so that's good 418 00:15:24,415 --> 00:15:26,463 So it's open a bar basic anime 419 00:15:26,719 --> 00:15:27,743 Script here 420 00:15:28,767 --> 00:15:33,631 We don't need this anymore so instead we're going to grab a reference to 421 00:15:33,887 --> 00:15:36,447 That velocity components so already far 422 00:15:36,959 --> 00:15:39,263 Velocity component is equal to 423 00:15:39,775 --> 00:15:40,543 Elastic 424 00:15:40,799 --> 00:15:43,871 And then in the process method we can simply call 425 00:15:44,127 --> 00:15:45,407 Lastly compound 426 00:15:45,919 --> 00:15:47,455 Dart xcelerate 427 00:15:47,711 --> 00:15:51,295 And then what was this called this was called Accelerate to play 428 00:15:51,551 --> 00:15:53,599 So that's what we're going to call in r 429 00:15:53,855 --> 00:15:55,391 Crypto accelerator 430 00:15:56,159 --> 00:15:56,671 Player 431 00:15:57,951 --> 00:15:58,463 Ok 432 00:15:58,719 --> 00:16:00,255 And then we can call velocity 433 00:16:00,511 --> 00:16:04,863 Component that move and I'm passing the self because this is 434 00:16:06,655 --> 00:16:08,447 So now we should be able to remove 435 00:16:08,959 --> 00:16:09,727 These 436 00:16:09,983 --> 00:16:11,007 Free call 437 00:16:12,543 --> 00:16:14,079 And we can also remove this 438 00:16:15,359 --> 00:16:18,687 And by the way there's no longer I need to have a rash 439 00:16:18,943 --> 00:16:20,223 Health component in the sky 440 00:16:20,735 --> 00:16:21,759 So what's going on remove 441 00:16:22,015 --> 00:16:22,527 As well 442 00:16:22,783 --> 00:16:26,879 Ok so we've simplify down at two lines and that's not really the strength 443 00:16:27,135 --> 00:16:29,183 Pulling a Sandra of last week about the strangers 444 00:16:29,695 --> 00:16:33,023 Now we can control the max speed and the acceleration 445 00:16:33,279 --> 00:16:36,351 And we can make a wildly different numbers for different enemy types 446 00:16:36,863 --> 00:16:41,471 And we have a nice or component that we can further extend with more functionality 447 00:16:41,983 --> 00:16:42,751 That can then be you 448 00:16:43,263 --> 00:16:44,031 Everywhere 449 00:16:44,543 --> 00:16:49,407 So in order to make sure that we did everything correctly let's just Run the game and make sure that our rat enemy 450 00:16:49,919 --> 00:16:50,431 Is still work 451 00:16:51,711 --> 00:16:52,223 It's not 452 00:16:52,735 --> 00:16:54,271 And I think I have a typo 453 00:16:55,295 --> 00:16:58,367 Display align lives type that as known to die 454 00:16:59,903 --> 00:17:02,207 And then let's remove this normalize and we should be 455 00:17:02,463 --> 00:17:02,975 Ok 456 00:17:03,231 --> 00:17:06,047 So it's called dot normalized with a d 457 00:17:06,815 --> 00:17:08,351 So the typing is used for 458 00:17:08,607 --> 00:17:09,119 Because 459 00:17:09,375 --> 00:17:11,423 My player global position was not tight 460 00:17:11,679 --> 00:17:12,959 And so good dog cannot 461 00:17:13,215 --> 00:17:14,751 Give me hints about 462 00:17:15,007 --> 00:17:16,543 What function I can call her 463 00:17:16,799 --> 00:17:18,591 Because I didn't recognise this first 464 00:17:18,847 --> 00:17:21,407 Piece of the subtraction as a no 465 00:17:22,175 --> 00:17:24,223 But adding this as no 2D to the 466 00:17:24,479 --> 00:17:25,247 Telescope 467 00:17:25,503 --> 00:17:27,039 That's what it is and then 468 00:17:27,295 --> 00:17:29,855 Everything is good so let's go ahead and Run the game again 469 00:17:30,111 --> 00:17:34,207 And my enemy should still be moving now what your notice is Dad 470 00:17:34,463 --> 00:17:36,511 The enemies now or a lot slower 471 00:17:36,767 --> 00:17:37,279 Turn 472 00:17:37,791 --> 00:17:40,095 And that's because we have an acceleration 473 00:17:40,863 --> 00:17:44,191 Before we were just telling the enemy to go at max speed 474 00:17:44,447 --> 00:17:45,983 In the direction that we said to go 475 00:17:46,239 --> 00:17:49,567 And that made it like under the player much harder but watch what 476 00:17:50,079 --> 00:17:53,151 If I go to my basic enemy here in I change my acceleration 477 00:17:53,407 --> 00:17:54,687 Like .5 instead 478 00:17:56,223 --> 00:17:59,551 What you going to see is at the enemies are very slow to read 479 00:17:59,807 --> 00:18:00,319 To the 480 00:18:00,575 --> 00:18:01,087 Exposition 481 00:18:01,343 --> 00:18:02,623 So I can run past this 482 00:18:02,879 --> 00:18:05,695 Look how long it takes for that enemy to change Direction at 483 00:18:06,463 --> 00:18:06,975 Right 484 00:18:08,255 --> 00:18:11,071 So the cool thing about this is that we can actually achieve 485 00:18:11,327 --> 00:18:12,351 Prequel 486 00:18:12,607 --> 00:18:13,887 Enemy behaviour 487 00:18:14,143 --> 00:18:16,191 Buy just tweaking me stupid 488 00:18:16,447 --> 00:18:17,727 So I can keep it .5 489 00:18:17,983 --> 00:18:20,287 Turn the max speed up to 100 if I want 490 00:18:20,543 --> 00:18:21,311 And then what 491 00:18:22,079 --> 00:18:23,871 So now I've got all these enemies 492 00:18:24,127 --> 00:18:27,967 Lying around now look these actually kind of feel like flying enemies 493 00:18:28,223 --> 00:18:30,527 So we might use this combination of numbers 494 00:18:30,783 --> 00:18:31,295 To make 495 00:18:31,551 --> 00:18:33,855 Flying enemies to make it appear like 496 00:18:34,111 --> 00:18:38,207 You know they have to fight against the air in a decanter return around that quick 497 00:18:38,463 --> 00:18:39,999 You know it gives them some weight 498 00:18:40,511 --> 00:18:43,839 And of course we can also turn the acceleration up a bunch 499 00:18:44,095 --> 00:18:46,655 To essentially make them instantly respond 500 00:18:47,167 --> 00:18:47,679 2 501 00:18:47,935 --> 00:18:50,239 The changes in the player Direction like this enemies 502 00:18:50,495 --> 00:18:51,519 Borderline under 503 00:18:52,031 --> 00:18:52,543 So anyway 504 00:18:52,799 --> 00:18:55,871 With just these two parameters I'm going to reset those by the 505 00:18:56,127 --> 00:18:57,151 8 to 40 and 5 again 506 00:18:57,407 --> 00:19:01,247 Was just us to parameters we can actually create a wide variety of 507 00:19:01,503 --> 00:19:02,783 Any movement behave 508 00:19:03,295 --> 00:19:04,831 And all it takes is just a c 509 00:19:05,087 --> 00:19:05,599 Prescription 510 00:19:05,855 --> 00:19:06,367 Ok 511 00:19:06,623 --> 00:19:10,207 So with that detour and done let's go back to our wizard enemy 512 00:19:10,463 --> 00:19:12,511 And let's go ahead and instantiate 513 00:19:13,023 --> 00:19:15,327 Velocity component in the Wizard and I 514 00:19:15,839 --> 00:19:17,375 Below the health campaign 515 00:19:17,631 --> 00:19:20,447 And let's set the wizards max speed 516 00:19:20,959 --> 00:19:22,751 To maybe something 517 00:19:23,263 --> 00:19:24,799 Maybe something a little bit heart maybe 518 00:19:25,055 --> 00:19:25,567 6 519 00:19:25,823 --> 00:19:26,591 For the max speed 520 00:19:26,847 --> 00:19:28,895 LS20 acceleration down to something 521 00:19:30,687 --> 00:19:35,551 Now that this is we can go our main seem open up the enemy manager here 522 00:19:36,063 --> 00:19:36,831 What's going on 523 00:19:37,087 --> 00:19:38,111 That scene 524 00:19:38,367 --> 00:19:42,719 This basic enemy seem right here we're going to have to change all of this 525 00:19:42,975 --> 00:19:44,767 I'm just going to drag 526 00:19:45,023 --> 00:19:46,815 My wizard anime scene on today 527 00:19:47,071 --> 00:19:47,583 First 528 00:19:47,839 --> 00:19:50,399 And then go ahead and run it and see how they were 529 00:19:51,167 --> 00:19:52,959 And the nice thing about this is that 530 00:19:53,215 --> 00:19:55,775 We should be able to see what the enemy looks like so the enemies not me 531 00:19:56,543 --> 00:19:58,591 And the reason that is not moving is because we have 532 00:19:59,103 --> 00:20:01,407 Add Script To The my so it spawn incorrect 533 00:20:01,663 --> 00:20:03,455 Let's go out back door weather in 534 00:20:03,711 --> 00:20:05,247 Add a script to the route no 535 00:20:07,039 --> 00:20:09,343 Let's create an override of 536 00:20:09,599 --> 00:20:10,367 Process 537 00:20:10,623 --> 00:20:12,415 And I'll try pass in there for now 538 00:20:12,927 --> 00:20:16,511 A couple on ready variables and I want you to think what do we need to do 539 00:20:16,767 --> 00:20:18,303 In order to make the enemy move 540 00:20:18,559 --> 00:20:19,583 What how do we vote 541 00:20:21,119 --> 00:20:22,143 We do need a grab 542 00:20:22,399 --> 00:20:23,679 Reference to the last 543 00:20:24,447 --> 00:20:25,727 So let's go out and do 544 00:20:26,239 --> 00:20:27,775 Bar Brasserie komponen 545 00:20:28,031 --> 00:20:29,055 I would encourage you 546 00:20:29,311 --> 00:20:30,079 Also too 547 00:20:30,335 --> 00:20:31,359 Think ahead 548 00:20:31,615 --> 00:20:32,383 About what we do 549 00:20:32,639 --> 00:20:35,711 Try to you know even pause the video for a second 550 00:20:35,967 --> 00:20:38,015 And just try to anticipate 551 00:20:38,271 --> 00:20:39,551 What were going to be doing now 552 00:20:40,063 --> 00:20:41,087 Because if you are 553 00:20:41,343 --> 00:20:44,159 Only just doing everything that I say to do 554 00:20:44,415 --> 00:20:47,231 You may find out less effective than trying to predict 555 00:20:47,487 --> 00:20:47,999 What I'm go 556 00:20:49,279 --> 00:20:50,559 Just we'll tip for you 557 00:20:50,815 --> 00:20:51,583 Cheeky Panda 558 00:20:51,839 --> 00:20:53,631 Anyway let's go ahead and go further 559 00:20:53,887 --> 00:20:55,167 Elastic component disease 560 00:20:55,423 --> 00:20:55,935 To you 561 00:20:56,447 --> 00:20:56,959 Velocity 562 00:20:59,263 --> 00:21:02,591 And Annie trick you can do as you can grab a note 563 00:21:02,847 --> 00:21:05,151 With the mouse click and hold and drag 564 00:21:05,407 --> 00:21:08,991 And if you drop the load in here It just gives you the short hand wrap 565 00:21:09,247 --> 00:21:10,015 Let's do it in the sky 566 00:21:10,527 --> 00:21:11,807 But if you start dragging it 567 00:21:12,063 --> 00:21:13,599 And then you hit control 568 00:21:13,855 --> 00:21:15,391 Hold control and then release 569 00:21:15,647 --> 00:21:17,952 It would generate an on readystate 570 00:21:18,208 --> 00:21:18,720 Oreo 571 00:21:18,976 --> 00:21:23,072 So we can do that to be a little bit quicker now so I can say the last 572 00:21:23,328 --> 00:21:24,352 Important 573 00:21:24,608 --> 00:21:25,120 First 574 00:21:25,376 --> 00:21:26,400 Then hold control 575 00:21:27,680 --> 00:21:28,704 And there's are ballistic 576 00:21:28,960 --> 00:21:31,264 Neat little trick that you can keep in mind 577 00:21:31,520 --> 00:21:33,568 The process method what do we want to do 578 00:21:33,824 --> 00:21:36,896 We want to say velocity component xcelerate 579 00:21:37,408 --> 00:21:37,920 2 580 00:21:38,176 --> 00:21:38,688 Claire 581 00:21:39,456 --> 00:21:40,992 Ok and then we can save the last 582 00:21:41,248 --> 00:21:41,760 Component 583 00:21:42,016 --> 00:21:43,040 Rightmove 584 00:21:43,808 --> 00:21:44,320 Cell 585 00:21:45,600 --> 00:21:47,648 Let's go to our basic enemies 586 00:21:48,160 --> 00:21:49,440 And let's copy this 587 00:21:49,696 --> 00:21:50,464 Just like so 588 00:21:50,976 --> 00:21:52,000 So there's move sign 589 00:21:52,256 --> 00:21:53,024 Black radio 590 00:21:53,280 --> 00:21:55,328 Bring a back over to the wizard anime script 591 00:21:55,584 --> 00:22:00,192 Is that in there now if we really wanted to we could make another component for this 592 00:22:00,448 --> 00:22:03,008 But I'm fine with just copy and pasting it everywhere 593 00:22:03,264 --> 00:22:06,336 Ok let's create a new note under the wizard anime core 594 00:22:06,848 --> 00:22:07,360 Note 595 00:22:07,616 --> 00:22:09,408 Diesel into the Note 3 596 00:22:09,664 --> 00:22:10,432 And then 597 00:22:11,968 --> 00:22:15,040 Call this visuals and put it below the death component 598 00:22:16,320 --> 00:22:18,880 And then drag the Sprite to the as a child of that 599 00:22:19,136 --> 00:22:19,648 Note 600 00:22:19,904 --> 00:22:21,184 And then let's go ahead 601 00:22:21,440 --> 00:22:25,024 Created on ready reference to this by clicking and dragging the visual 602 00:22:25,280 --> 00:22:27,584 Then holding control then dropping it 603 00:22:28,352 --> 00:22:30,656 Get some now all of that should be worth 604 00:22:32,192 --> 00:22:35,008 If we go back to our first basic 605 00:22:36,032 --> 00:22:38,592 We can remove this get direction to player 606 00:22:40,128 --> 00:22:43,968 Keeping the code clean is important because it's very easy for cold to come out 607 00:22:44,224 --> 00:22:45,248 No you're not 608 00:22:45,504 --> 00:22:47,296 That these scripts are essential for the same 609 00:22:47,808 --> 00:22:49,600 And it may be tempting 610 00:22:50,112 --> 00:22:50,624 2 611 00:22:50,880 --> 00:22:53,184 Just create one script for the enemy there 612 00:22:53,440 --> 00:22:54,720 Is this content 613 00:22:54,976 --> 00:22:56,512 But I would caution you and 614 00:22:56,768 --> 00:22:59,328 Doing that because then it becomes very hard 615 00:22:59,584 --> 00:23:01,888 To create specific enemy behaviour 616 00:23:02,144 --> 00:23:03,168 Which we might do 617 00:23:04,448 --> 00:23:08,544 This is essentially a copy paste from the basic enemy however 618 00:23:08,800 --> 00:23:11,616 We don't want to share scripts necessarily 619 00:23:12,128 --> 00:23:13,408 Because that's going to be really 620 00:23:13,664 --> 00:23:14,944 Limit our ability to 621 00:23:15,200 --> 00:23:16,480 Implement unique enemy 622 00:23:17,248 --> 00:23:20,064 So when the course is done you can feel free to consolidate these but 623 00:23:20,320 --> 00:23:22,112 Let's keep them separate for 624 00:23:22,368 --> 00:23:26,464 Ok so now it's Run the game Remember our enemy manager is spawning a wizard 625 00:23:26,720 --> 00:23:28,000 And look at that 626 00:23:28,256 --> 00:23:34,400 Ok so we have a couple of problems the wizard is bunching up on itself and it's facing the wrong direction so this is a copy paste 627 00:23:34,656 --> 00:23:36,448 This is a great example of what I'm talking about 628 00:23:36,960 --> 00:23:37,472 This 629 00:23:37,728 --> 00:23:38,752 Visual scale 630 00:23:39,008 --> 00:23:42,848 Move sign needs to be actually different than the basic anime.so 631 00:23:43,104 --> 00:23:44,640 Remove the negative 632 00:23:45,152 --> 00:23:46,688 From the Move sign in there 633 00:23:46,944 --> 00:23:47,712 And that will fix it 634 00:23:48,224 --> 00:23:53,088 And then we need to go to a route now here and change the layer that the enemy 635 00:23:53,856 --> 00:23:55,136 And the layer we want 636 00:23:55,392 --> 00:23:56,416 Is able 637 00:23:56,672 --> 00:23:58,208 5 or sorry 638 00:23:58,464 --> 00:23:59,744 4anime 639 00:24:00,256 --> 00:24:04,864 So we don't want to exist on the train later but we do want the wizard to exist on the enemy collision 640 00:24:05,120 --> 00:24:08,960 So that he collides with other enemies and doesn't Bunch up 641 00:24:09,984 --> 00:24:12,032 Additionally we need to set the mass 642 00:24:12,288 --> 00:24:13,056 To that as 643 00:24:13,312 --> 00:24:14,592 So that it also 644 00:24:14,848 --> 00:24:15,872 Oxford collisions on 645 00:24:16,640 --> 00:24:20,480 Ok let's go back to a basic anime and we can see in the snow 646 00:24:20,736 --> 00:24:24,576 Tab here in groups we need to add the wizard to the enemy group 647 00:24:24,832 --> 00:24:27,648 Well so there's a lot of setup to do that we need to remember 648 00:24:27,904 --> 00:24:31,232 Let's go to a wizard anime go to the new tab got a group 649 00:24:31,744 --> 00:24:32,256 Right 650 00:24:32,512 --> 00:24:33,536 Enemy in this 651 00:24:33,792 --> 00:24:35,328 Text boxes in Annan 652 00:24:35,840 --> 00:24:41,984 Just a little bit more said to go on this wizard we needed you two more things so the hurtbox component here needs are 653 00:24:42,240 --> 00:24:43,264 France to the health camp 654 00:24:44,032 --> 00:24:45,824 So that's good and rank the health component down 655 00:24:46,080 --> 00:24:46,592 Intern 656 00:24:47,616 --> 00:24:51,712 And then we need it in Stand should a child scene we need to instantiate a vile 657 00:24:52,992 --> 00:24:53,760 I'm going to put that 658 00:24:54,016 --> 00:24:55,040 Above here as well 659 00:24:55,296 --> 00:24:59,904 Let's attach the health component to the cell component property as well so drag their health and put it over 660 00:25:00,160 --> 00:25:01,696 Or this time I'm going to 661 00:25:01,952 --> 00:25:04,000 A sign and double click the whole component 662 00:25:06,048 --> 00:25:07,840 And then the drop percent 663 00:25:08,096 --> 00:25:10,656 Let's make the wizard drops 664 00:25:10,912 --> 00:25:11,936 .5 665 00:25:12,192 --> 00:25:14,240 And let's go to a basic enemy here 666 00:25:14,752 --> 00:25:16,544 And turn down the volume 667 00:25:16,800 --> 00:25:17,568 This one too 668 00:25:18,080 --> 00:25:18,592 30 669 00:25:18,848 --> 00:25:19,360 5% 670 00:25:19,616 --> 00:25:23,968 Right now it's Run the game and we should be able to kill a wizard so let's go ahead and see 671 00:25:24,224 --> 00:25:24,992 If we can do so 672 00:25:27,040 --> 00:25:28,576 And you should notice that 673 00:25:28,832 --> 00:25:29,856 Our death 674 00:25:30,112 --> 00:25:32,160 Component is working flawlessly 675 00:25:32,672 --> 00:25:33,184 With that 676 00:25:33,440 --> 00:25:34,720 So now we have 677 00:25:34,976 --> 00:25:36,256 Free death animations 678 00:25:36,768 --> 00:25:39,840 For every type of enemy by just building that 679 00:25:40,096 --> 00:25:40,608 Component 680 00:25:40,864 --> 00:25:47,008 Alright our wizard enemy has been implemented the next step is to make it so that 681 00:25:47,264 --> 00:25:50,080 Game can spawn different types of Venom 682 00:25:50,336 --> 00:25:51,360 As the game 44481

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.