All language subtitles for 17. Enemy pooling

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
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
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian Download
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:03,850 --> 00:00:07,180 In my profile, doing pretty good. 2 00:00:07,360 --> 00:00:12,070 All right, so CPI's still really good rendering. 3 00:00:12,880 --> 00:00:16,840 Only got 17 draw calls, nine plus calls at the moment. 4 00:00:17,410 --> 00:00:22,150 OK, so and performance wise, everything is still really, really good. 5 00:00:23,170 --> 00:00:28,210 And now is not much of a game because we've only got three characters and all we have to do is just 6 00:00:28,210 --> 00:00:30,080 shoot them once and they barely even move. 7 00:00:30,100 --> 00:00:32,400 OK, so we definitely don't want that. 8 00:00:33,130 --> 00:00:39,520 What we want effectively is the appearance of lots and lots of characters, but without actually overloading 9 00:00:39,520 --> 00:00:41,230 your system with lots and lots of characters. 10 00:00:41,590 --> 00:00:46,840 So we're going to create a spawning system, but we're going to do so using an appalling system, which 11 00:00:46,840 --> 00:00:49,210 is effectively just switching characters on and off. 12 00:00:50,210 --> 00:00:55,480 And now, in a moment, I'm going to focus on the zombie character without the other characters. 13 00:00:55,750 --> 00:00:58,540 But before I do so, I've noticed a bit of a timing issue. 14 00:00:59,110 --> 00:01:00,370 The bat death looks good. 15 00:01:00,580 --> 00:01:04,230 Ghost death is too long, and the zombie death is a bit too long. 16 00:01:04,300 --> 00:01:05,860 He starts to slide a little bit. 17 00:01:06,430 --> 00:01:11,050 So in my script, the first one to do is I need a new wait. 18 00:01:11,050 --> 00:01:12,520 Four seconds for ghost. 19 00:01:13,540 --> 00:01:19,330 So wait four seconds and I'll call it 20 00:01:21,940 --> 00:01:23,550 oops, ghost. 21 00:01:23,860 --> 00:01:27,910 Death time equals new. 22 00:01:28,300 --> 00:01:29,590 Wait for seconds. 23 00:01:31,060 --> 00:01:37,660 And you can have this one pretty sure till about zero point three whenever you add these decimals. 24 00:01:37,660 --> 00:01:41,770 And OfflOW always put an F. after it to let I know that it is a decimal float value. 25 00:01:42,280 --> 00:01:42,700 OK. 26 00:01:43,090 --> 00:01:45,500 Otherwise it considers it some kind of a money. 27 00:01:45,550 --> 00:01:50,830 It is a float, but it just expects the earth so that it understands exactly what it is. 28 00:01:51,430 --> 00:01:52,990 Zombie time is a little bit too long. 29 00:01:52,990 --> 00:01:55,420 So when they make this about one point five. 30 00:01:56,710 --> 00:01:57,080 Okay. 31 00:01:57,100 --> 00:01:59,140 And the death time is very good. 32 00:02:00,010 --> 00:02:04,420 So I'm going to go down here to ghost time. 33 00:02:06,430 --> 00:02:12,400 And I just want to double check these again to make sure that those timings know a lot more effective. 34 00:02:14,830 --> 00:02:21,340 Uh, I'm going to go back to game and just switch off my audio the moment. 35 00:02:24,990 --> 00:02:25,990 Let's take a look. 36 00:02:26,010 --> 00:02:28,140 So, yeah, I shoot the bat. 37 00:02:28,260 --> 00:02:29,100 All right, that's good. 38 00:02:29,670 --> 00:02:30,630 Shoot the ghost. 39 00:02:32,820 --> 00:02:37,680 Yeah, could be a little bit quicker than some be much more effective. 40 00:02:38,040 --> 00:02:38,490 All right. 41 00:02:38,520 --> 00:02:39,090 Excellent. 42 00:02:39,120 --> 00:02:42,570 So just go just a little bit faster. 43 00:02:43,600 --> 00:02:48,140 So by zero point two, just leave it at that. 44 00:02:51,240 --> 00:02:51,640 OK. 45 00:02:51,660 --> 00:02:55,240 So as I say, it wouldn't be much of a game unless you get lots and lots of enemies. 46 00:02:55,350 --> 00:02:58,140 So I'm going to focus on the zombie character to begin with. 47 00:02:58,150 --> 00:03:00,720 So I'm just going to take these two characters and switch them off. 48 00:03:01,620 --> 00:03:06,230 And what they want is a second zombie character clicking on this one. 49 00:03:06,240 --> 00:03:08,400 I'm going to do a control and to duplicate. 50 00:03:09,720 --> 00:03:13,800 And let's just move this one maybe over this side. 51 00:03:18,020 --> 00:03:20,310 Just get him to kind of look at the player. 52 00:03:21,210 --> 00:03:27,330 All right, now, got to zombies now when we switch them off, we need to tell them where to reappear. 53 00:03:27,780 --> 00:03:30,180 So we need some kind of a spawn spot. 54 00:03:31,290 --> 00:03:34,710 So I'm going to create a few of these. 55 00:03:35,220 --> 00:03:38,370 The current spawn spot just to spawn point. 56 00:03:39,630 --> 00:03:44,490 So game object, 3D object, just a cube to begin with so I can visualize it. 57 00:03:46,110 --> 00:03:47,610 Yep, I think that's fine. 58 00:03:50,250 --> 00:03:55,500 And I'll call this spawn point one. 59 00:03:57,610 --> 00:04:07,450 And duplicate that control day and might have another spawn point over here. 60 00:04:08,220 --> 00:04:09,910 So this would be spawn point to. 61 00:04:14,830 --> 00:04:16,720 Controlling day of another one. 62 00:04:17,560 --> 00:04:18,970 Let's put it further up here. 63 00:04:20,260 --> 00:04:21,640 Spawn point three. 64 00:04:26,420 --> 00:04:26,900 Control and. 65 00:04:27,650 --> 00:04:30,380 It's not one over here. 66 00:04:32,490 --> 00:04:33,750 Spawn point four. 67 00:04:36,890 --> 00:04:37,240 OK. 68 00:04:38,510 --> 00:04:41,090 And now I definitely don't need to. 69 00:04:41,630 --> 00:04:47,390 In fact, let me just double check that last spawn point one to three. 70 00:04:47,480 --> 00:04:48,780 I can't see that last one. 71 00:04:48,800 --> 00:04:49,880 It's out of screen. 72 00:04:49,880 --> 00:04:52,880 So, Julie, I'll just bring that in a bit. 73 00:04:58,820 --> 00:05:02,060 Just put my simulator over on this side and a little bit. 74 00:05:05,610 --> 00:05:06,210 There it is. 75 00:05:06,300 --> 00:05:06,960 OK, good. 76 00:05:07,350 --> 00:05:08,220 Going to put it up there. 77 00:05:08,640 --> 00:05:15,540 The reason why I don't want Tubruq to spawning off screen so that I don't actually see them, although 78 00:05:15,540 --> 00:05:22,530 I can move my screen over, I don't want them to be spawning too far away. 79 00:05:23,450 --> 00:05:27,690 Actually, I'm just going to bring this down a bit and it kind of spawns over here. 80 00:05:28,320 --> 00:05:29,650 And this one's good. 81 00:05:29,670 --> 00:05:31,560 This one's probably too close, actually. 82 00:05:32,340 --> 00:05:39,930 So I might have this one kind of spill and even further back, all the way over here gives you time 83 00:05:39,930 --> 00:05:41,040 to actually react then. 84 00:05:43,290 --> 00:05:45,630 Yeah, OK. 85 00:05:45,630 --> 00:05:46,530 I think that's fine. 86 00:05:50,940 --> 00:05:56,610 Now, obviously, I don't want to see these spawn points, they only exist as transforms. 87 00:05:57,030 --> 00:05:58,560 So I'm just going to take all four of them. 88 00:05:59,010 --> 00:06:03,210 Right click remove box collider, right click removed and actually render it. 89 00:06:03,810 --> 00:06:05,280 Don't even need a mesh filter. 90 00:06:05,280 --> 00:06:06,090 My click remove. 91 00:06:06,090 --> 00:06:08,820 But all I'm interested in is their positions. 92 00:06:09,450 --> 00:06:11,490 OK, so that's fine. 93 00:06:12,530 --> 00:06:13,920 It's now in the script. 94 00:06:16,020 --> 00:06:18,210 I need to assign these at the beginning. 95 00:06:18,330 --> 00:06:23,120 So let me leave myself a message spawn points. 96 00:06:24,450 --> 00:06:26,200 So first, what do we need? 97 00:06:26,220 --> 00:06:30,120 We need it public integer. 98 00:06:30,300 --> 00:06:35,800 I'm simply going to call some BS on screen now at the moment. 99 00:06:35,820 --> 00:06:38,040 I have to two zombies. 100 00:06:38,340 --> 00:06:38,660 OK. 101 00:06:39,330 --> 00:06:45,030 And then I need a doctor. 102 00:06:45,140 --> 00:06:46,280 He doesn't need to be public. 103 00:06:46,290 --> 00:06:49,920 This can be a private type game object. 104 00:06:50,250 --> 00:06:53,940 Nicole last destroyed zombie. 105 00:06:54,960 --> 00:07:01,440 This is a place where the actual zombie character can be stored and accessed in the script. 106 00:07:02,490 --> 00:07:09,410 And then finally, I need the public health to transform called spawn points. 107 00:07:09,810 --> 00:07:10,110 What? 108 00:07:12,180 --> 00:07:18,700 And obviously we got four of these control and C and B, control the control and fee. 109 00:07:19,410 --> 00:07:24,300 Let's change the numbers on these some two, three and four. 110 00:07:26,100 --> 00:07:28,760 So let's just make sure that we assign these to begin with. 111 00:07:28,760 --> 00:07:31,350 Otherwise, I will undoubtedly forget. 112 00:07:36,330 --> 00:07:40,980 So on the ground, you simply need to assign these spawn points. 113 00:07:44,770 --> 00:07:52,780 And the spawn points are not going to move so they can actually be set to static. 114 00:07:54,190 --> 00:07:58,870 OK, since they're not going to move, they don't have any rendering elements anyway, they're only 115 00:07:58,870 --> 00:07:59,560 transforms. 116 00:08:02,710 --> 00:08:11,630 OK, so what we need to do now in the well, actually, I think we need some more elements. 117 00:08:13,330 --> 00:08:16,990 We need the character to look at the player. 118 00:08:17,170 --> 00:08:20,880 So we need access to our actual player. 119 00:08:20,890 --> 00:08:24,880 I think actually I do like do I not have player already? 120 00:08:28,850 --> 00:08:30,110 Target exclude. 121 00:08:30,980 --> 00:08:39,020 No, I don't have the player on the here, so public health type transform old player. 122 00:08:40,910 --> 00:08:43,900 Then we now have a private integer. 123 00:08:44,470 --> 00:08:44,860 Number. 124 00:08:45,310 --> 00:08:49,540 I'm simply going to call spot the equal one to begin with. 125 00:08:49,930 --> 00:08:53,650 This is going to iterate through if it's one, two, three or four. 126 00:08:53,680 --> 00:08:56,590 It will line up with spawn point one, two, three or four. 127 00:08:58,450 --> 00:09:07,690 Then a private transform this just so that I can store the value of the next available slot. 128 00:09:12,130 --> 00:09:12,520 OK. 129 00:09:13,060 --> 00:09:16,240 And then finally, a new wait for seconds. 130 00:09:19,080 --> 00:09:19,900 When the call. 131 00:09:24,490 --> 00:09:27,720 I'm going to call it schwarm time. 132 00:09:30,120 --> 00:09:36,830 OK, equals a new wait for seconds, lasts exactly one second. 133 00:09:39,960 --> 00:09:48,300 So now in the start, when they want to do is call a new function, I'll call it simply time countdown. 134 00:09:48,780 --> 00:09:50,130 We'll be using this later. 135 00:09:51,210 --> 00:09:54,810 The time countdown will add a timer. 136 00:09:55,530 --> 00:09:58,190 From here, we can also call a lot of other functions. 137 00:09:58,200 --> 00:10:00,510 Don't need to run in the update. 138 00:10:00,810 --> 00:10:02,910 The update call is called once per frame. 139 00:10:02,940 --> 00:10:08,760 So if you run in 60 frames per second, it would be called 60 times a second, whereas a custom function, 140 00:10:08,760 --> 00:10:10,020 you can get that to run. 141 00:10:10,350 --> 00:10:12,480 Let's say once a second if you want. 142 00:10:12,870 --> 00:10:13,890 And that's what we're going to do. 143 00:10:14,700 --> 00:10:19,020 So I want my own function now called time count now. 144 00:10:21,090 --> 00:10:24,750 So that's going to be a void time countdown. 145 00:10:28,350 --> 00:10:36,420 And from here, I can now start a new Kurichi, I will call time delay. 146 00:10:41,320 --> 00:10:45,620 So as it come down to my cortines, I'll do this one slightly above this. 147 00:10:45,650 --> 00:10:47,890 No, actually, I'll do it below these deaths. 148 00:10:48,130 --> 00:10:49,120 I numerators. 149 00:10:49,660 --> 00:10:54,100 So I enumerator full time delay. 150 00:10:57,220 --> 00:11:03,460 I'm going to run my yield return and it's going to be sporn time. 151 00:11:06,000 --> 00:11:09,240 OK, so in the words us once per second. 152 00:11:09,690 --> 00:11:14,520 So what is it like to start coroutine? 153 00:11:20,590 --> 00:11:21,220 Why is it? 154 00:11:23,670 --> 00:11:26,210 The names start, Curtin doesn't exist. 155 00:11:28,670 --> 00:11:29,090 Why not? 156 00:11:29,120 --> 00:11:32,270 Oh, yeah, spelt it wrong, of course. 157 00:11:32,420 --> 00:11:33,680 Yeah, and. 158 00:11:36,210 --> 00:11:41,760 Basically, on the on the start, we're running this function and then the function is going to loop 159 00:11:42,060 --> 00:11:46,890 again and again, so it's basically going to run this coroutine, it's going to force it to only run 160 00:11:46,890 --> 00:11:48,510 every once per second. 161 00:11:48,810 --> 00:11:49,200 All right. 162 00:11:49,200 --> 00:11:51,030 Which is optimized for mobile. 163 00:11:51,330 --> 00:11:53,490 Not everything has to run every frame. 164 00:11:54,540 --> 00:12:03,730 OK, so inside of our time delay, we're going to say, and time countdown, that's going to force it 165 00:12:03,780 --> 00:12:05,640 back to that custom function that we have. 166 00:12:05,880 --> 00:12:08,490 And so it's going to be on a constant loop. 167 00:12:08,550 --> 00:12:10,770 It's going to run over every second. 168 00:12:11,520 --> 00:12:18,000 And then we're going to do check for animes, another custom function that we're going to write in the 169 00:12:18,000 --> 00:12:18,450 second. 170 00:12:21,480 --> 00:12:29,540 So I'm just wondering where to put this, I might put it just below shoot so void. 171 00:12:29,990 --> 00:12:32,720 Check for Miss. 172 00:12:36,790 --> 00:12:37,180 OK. 173 00:12:37,390 --> 00:12:45,760 And whenever we shoot a zombie, we have zombies on screen. 174 00:12:45,880 --> 00:12:47,650 We want the minus that number. 175 00:12:48,670 --> 00:12:56,460 OK, so if we get a zombie, we're simply going to say as some BS on screen, minus, minus. 176 00:12:58,100 --> 00:12:59,650 So we know we've killed a zombie. 177 00:13:00,130 --> 00:13:03,190 So then in the check for enemies, you can actually check that. 178 00:13:03,730 --> 00:13:07,690 So we can say if zombies on screen. 179 00:13:12,710 --> 00:13:19,460 Less than two in this case, then we can do something. 180 00:13:19,790 --> 00:13:26,870 OK, so in this case, we're going to do another function within this cold check spots so that we can 181 00:13:26,870 --> 00:13:29,930 find what what is the next available sporn spot. 182 00:13:30,830 --> 00:13:33,050 Let's do that first before we do anything else. 183 00:13:35,190 --> 00:13:37,820 We'd check sports. 184 00:13:44,060 --> 00:13:57,390 OK, and the checks box is simply going to say if a spot is equal to one and next available slot. 185 00:14:00,870 --> 00:14:13,950 Is going to equal spawn spot one or spawn point one and copy this control and see control and B, control 186 00:14:13,950 --> 00:14:16,500 and the and once again, control and vs. 187 00:14:16,560 --> 00:14:18,870 Now I'm in the same spot is equal to two. 188 00:14:19,620 --> 00:14:25,260 Then it's going to equal spawn point to equal to three, then it's going to equal three. 189 00:14:25,890 --> 00:14:29,070 And if it's four, it's going to equal spawn point four. 190 00:14:29,530 --> 00:14:35,070 So notice we're just using this one variable of next available slot, but we keep changing its position 191 00:14:35,580 --> 00:14:38,490 based on whatever this spot is reading. 192 00:14:39,180 --> 00:14:40,980 It's now back up to our check for Randomise. 193 00:14:42,480 --> 00:14:50,670 I'm going to say, if last destroyed ZOMBI is not equal. 194 00:14:51,480 --> 00:14:52,920 All right, so it's two equals. 195 00:14:52,920 --> 00:14:54,600 It means is equal to a value. 196 00:14:54,900 --> 00:15:01,440 If it's exclamation mark, which is a not equal, it's checking if it isn't equal to no. 197 00:15:02,040 --> 00:15:04,920 That's effectively saying as long as that slope is not empty. 198 00:15:06,030 --> 00:15:08,370 So it's actually filled with some kind of zombie. 199 00:15:08,550 --> 00:15:19,710 If that's the case, then we're going to say last destroyed zombie dot transform dot position is equal 200 00:15:19,710 --> 00:15:23,430 to the next available slot dot. 201 00:15:24,460 --> 00:15:33,160 Position so it moves that zombie into that place, and then we have to iterate through the spots now, 202 00:15:33,160 --> 00:15:44,380 so we're going to say if spot is less than for just space there, and we're simply going to increase 203 00:15:44,380 --> 00:15:46,900 the spot amount, we're going to increment it. 204 00:15:47,170 --> 00:15:47,450 OK. 205 00:15:47,990 --> 00:15:48,340 OK. 206 00:15:48,370 --> 00:15:55,630 However, if spot is equal to four. 207 00:15:56,170 --> 00:15:57,400 So we've reached the limit. 208 00:15:58,000 --> 00:16:01,780 We're going to return back to the first one to get spot equals one. 209 00:16:03,940 --> 00:16:04,240 All right. 210 00:16:04,240 --> 00:16:06,250 So it's an endless loop that keeps going around. 211 00:16:06,760 --> 00:16:10,900 And then we're going to get our last destroyed zombie to actually face up player. 212 00:16:11,170 --> 00:16:15,610 So last destroyed zombie darts transformed. 213 00:16:15,610 --> 00:16:19,900 Don't look at what is it going to look at. 214 00:16:19,910 --> 00:16:20,980 It's going to look at the player. 215 00:16:24,680 --> 00:16:28,270 Notice only runs once or only runs on one frame. 216 00:16:28,900 --> 00:16:36,340 Be careful not to use your look at over multiple frames, you know, otherwise your your any animations 217 00:16:36,340 --> 00:16:37,540 are really weird. 218 00:16:37,930 --> 00:16:39,820 We only need it to look at the play once. 219 00:16:40,810 --> 00:16:43,270 And then finally, we just need to switch it up. 220 00:16:43,660 --> 00:16:51,490 OK, so lost, destroyed zombie darts set active to true. 221 00:16:52,780 --> 00:16:54,640 And it will basically reappear again. 222 00:16:55,540 --> 00:17:02,470 And then finally, when we come up to where we're shooting the zombie, we have to basically set our 223 00:17:03,190 --> 00:17:06,750 zombie to the last destroyed zombie. 224 00:17:06,760 --> 00:17:15,280 So we're going to say last destroyed zombie equals hit dart transform. 225 00:17:17,880 --> 00:17:19,530 Dart game object. 226 00:17:19,590 --> 00:17:26,160 Whichever zombie would just hit basically it up, that will then get passed into that last destroyed 227 00:17:26,160 --> 00:17:27,030 zombie slot. 228 00:17:28,950 --> 00:17:36,000 And then when we're checking the zombies, as soon as we spawned a zombie back then, we simply need 229 00:17:36,000 --> 00:17:38,430 to say zombies on screen. 230 00:17:40,420 --> 00:17:47,440 Plus plus, we send it back to two, otherwise we're going to get an endless loop of zombies and. 231 00:17:48,850 --> 00:17:52,740 So let's save this and see what happens at the moment. 232 00:17:56,590 --> 00:17:59,230 So on the ground, just check for any missing. 233 00:17:59,680 --> 00:18:01,150 Yep, got on that player. 234 00:18:01,960 --> 00:18:05,050 I'll use main camera that's flying into the play slot. 235 00:18:05,440 --> 00:18:07,120 So let's just check this now. 236 00:18:11,100 --> 00:18:15,070 So try it in this character, so he goes down. 237 00:18:15,150 --> 00:18:15,300 OK. 238 00:18:16,020 --> 00:18:18,420 He appeared in the back there, something happened. 239 00:18:19,170 --> 00:18:20,340 Oh, is there as well. 240 00:18:20,680 --> 00:18:31,200 And now what's happening is because of the delay and it is working, but obviously, because I've delayed 241 00:18:31,920 --> 00:18:40,100 the destruction of the zombie by two seconds, it's actually spawning instantly and then basically killing 242 00:18:40,110 --> 00:18:41,340 it at the new position. 243 00:18:42,570 --> 00:18:49,830 OK, so I need to make sure that my zombies on screen minus minus is not happening here. 244 00:18:50,550 --> 00:18:58,850 If I just take this out, control X quote, I'm actually going to do it in the zombie death, OK? 245 00:18:58,950 --> 00:19:02,700 As soon as it's switched the zombie off, then I can do that. 246 00:19:02,880 --> 00:19:03,690 Control the movie. 247 00:19:06,240 --> 00:19:06,830 Safe. 248 00:19:07,080 --> 00:19:08,070 Let's check it now. 249 00:19:16,510 --> 00:19:17,790 So let's try it again. 250 00:19:19,170 --> 00:19:20,040 Kill this guy. 251 00:19:21,600 --> 00:19:22,650 Then he appears OK there. 252 00:19:23,820 --> 00:19:24,810 Kill this guy. 253 00:19:26,220 --> 00:19:29,040 Is there try and kill that guy. 254 00:19:30,450 --> 00:19:34,620 He appears over there in the top, the top left. 255 00:19:35,400 --> 00:19:39,270 Kill this guy and he is there in the top right. 256 00:19:39,300 --> 00:19:42,060 OK, so it's basically switching them on and off. 257 00:19:42,360 --> 00:19:44,160 But at the moment, they're not targeting me. 258 00:19:44,170 --> 00:19:45,510 They're not walking towards me. 259 00:19:45,930 --> 00:19:47,020 So we need to fix that. 260 00:19:48,330 --> 00:19:55,200 Now, in the anime move, if it's a zombie, we're running this move to this start function only gets 261 00:19:55,200 --> 00:19:59,730 called right at the beginning of the game when when the zombies first switched on. 262 00:20:00,300 --> 00:20:02,800 We need to call this from another script. 263 00:20:02,850 --> 00:20:05,780 So to do that, we're simply going to make this void public. 264 00:20:06,420 --> 00:20:08,670 So it's available, all the scripts. 265 00:20:09,330 --> 00:20:09,840 So. 266 00:20:16,100 --> 00:20:24,920 Now that we have access to this, we can then call it OK, so and as soon as we spawn one of these creatures 267 00:20:25,250 --> 00:20:34,940 last destroyed somebody selected to true and we're simply going to say blast destroyed zombie darts, 268 00:20:35,480 --> 00:20:39,020 transform dart game object. 269 00:20:41,550 --> 00:20:42,880 But I don't think I need that. 270 00:20:43,070 --> 00:20:44,960 It is it is a game object, isn't it? 271 00:20:44,970 --> 00:20:47,670 So don't get components. 272 00:20:48,570 --> 00:20:52,410 And the component I want is basically the script, the enemy move. 273 00:20:52,980 --> 00:20:58,320 So I'm going to type and then we move this recognizes it now open and close brackets. 274 00:20:58,320 --> 00:21:02,340 And then from there, I can press and call any of the functions. 275 00:21:02,850 --> 00:21:04,410 And I simply called it move two. 276 00:21:05,130 --> 00:21:07,830 So let's call that move to. 277 00:21:10,230 --> 00:21:12,630 Yeah, we go and then semicolon on the end. 278 00:21:13,050 --> 00:21:16,560 So we're effectively calling that function. 279 00:21:16,960 --> 00:21:20,340 So in the end, agent destination to the player target top position. 280 00:21:22,740 --> 00:21:23,340 Say that. 281 00:21:29,150 --> 00:21:31,250 And now I can test this out. 282 00:21:32,510 --> 00:21:35,390 So I think this time I'll shoot the zombie on the left. 283 00:21:38,500 --> 00:21:40,180 Shoot the zombie on the right. 284 00:21:42,200 --> 00:21:45,110 Now notice that the zombies are now walking toward me again. 285 00:21:46,130 --> 00:21:46,490 Good. 286 00:21:47,670 --> 00:21:52,280 Should this some be this one I missed? 287 00:21:56,300 --> 00:21:58,280 And that guy's got to be on the tombstone. 288 00:22:01,500 --> 00:22:02,550 OK, good. 289 00:22:02,700 --> 00:22:05,700 We've got an endless wave of zombies or at least two zombies. 290 00:22:06,210 --> 00:22:09,180 So obviously we're going to put more zombies in a little bit later. 291 00:22:09,420 --> 00:22:13,440 We know that we've got a system that now works great. 292 00:22:13,450 --> 00:22:17,520 And in the next video, we're going to do the same for the bats and the ghosts. 293 00:22:17,850 --> 00:22:23,400 However, if you want to give that a go yourself, by all means, give it give it a go if you like. 294 00:22:23,700 --> 00:22:26,220 But I'm going to show you how that works in the next video. 25461

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