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
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

Original subtitles

In my profile, doing pretty good.

All right, so CPI's still really good rendering.

Only got 17 draw calls, nine plus calls at the moment.

OK, so and performance wise, everything is still really, really good.

And now is not much of a game because we've only got three characters and all we have to do is just

shoot them once and they barely even move.

OK, so we definitely don't want that.

What we want effectively is the appearance of lots and lots of characters, but without actually overloading

your system with lots and lots of characters.

So we're going to create a spawning system, but we're going to do so using an appalling system, which

is effectively just switching characters on and off.

And now, in a moment, I'm going to focus on the zombie character without the other characters.

But before I do so, I've noticed a bit of a timing issue.

The bat death looks good.

Ghost death is too long, and the zombie death is a bit too long.

He starts to slide a little bit.

So in my script, the first one to do is I need a new wait.

Four seconds for ghost.

So wait four seconds and I'll call it

oops, ghost.

Death time equals new.

Wait for seconds.

And you can have this one pretty sure till about zero point three whenever you add these decimals.

And OfflOW always put an F. after it to let I know that it is a decimal float value.

OK.

Otherwise it considers it some kind of a money.

It is a float, but it just expects the earth so that it understands exactly what it is.

Zombie time is a little bit too long.

So when they make this about one point five.

Okay.

And the death time is very good.

So I'm going to go down here to ghost time.

And I just want to double check these again to make sure that those timings know a lot more effective.

Uh, I'm going to go back to game and just switch off my audio the moment.

Let's take a look.

So, yeah, I shoot the bat.

All right, that's good.

Shoot the ghost.

Yeah, could be a little bit quicker than some be much more effective.

All right.

Excellent.

So just go just a little bit faster.

So by zero point two, just leave it at that.

OK.

So as I say, it wouldn't be much of a game unless you get lots and lots of enemies.

So I'm going to focus on the zombie character to begin with.

So I'm just going to take these two characters and switch them off.

And what they want is a second zombie character clicking on this one.

I'm going to do a control and to duplicate.

And let's just move this one maybe over this side.

Just get him to kind of look at the player.

All right, now, got to zombies now when we switch them off, we need to tell them where to reappear.

So we need some kind of a spawn spot.

So I'm going to create a few of these.

The current spawn spot just to spawn point.

So game object, 3D object, just a cube to begin with so I can visualize it.

Yep, I think that's fine.

And I'll call this spawn point one.

And duplicate that control day and might have another spawn point over here.

So this would be spawn point to.

Controlling day of another one.

Let's put it further up here.

Spawn point three.

Control and.

It's not one over here.

Spawn point four.

OK.

And now I definitely don't need to.

In fact, let me just double check that last spawn point one to three.

I can't see that last one.

It's out of screen.

So, Julie, I'll just bring that in a bit.

Just put my simulator over on this side and a little bit.

There it is.

OK, good.

Going to put it up there.

The reason why I don't want Tubruq to spawning off screen so that I don't actually see them, although

I can move my screen over, I don't want them to be spawning too far away.

Actually, I'm just going to bring this down a bit and it kind of spawns over here.

And this one's good.

This one's probably too close, actually.

So I might have this one kind of spill and even further back, all the way over here gives you time

to actually react then.

Yeah, OK.

I think that's fine.

Now, obviously, I don't want to see these spawn points, they only exist as transforms.

So I'm just going to take all four of them.

Right click remove box collider, right click removed and actually render it.

Don't even need a mesh filter.

My click remove.

But all I'm interested in is their positions.

OK, so that's fine.

It's now in the script.

I need to assign these at the beginning.

So let me leave myself a message spawn points.

So first, what do we need?

We need it public integer.

I'm simply going to call some BS on screen now at the moment.

I have to two zombies.

OK.

And then I need a doctor.

He doesn't need to be public.

This can be a private type game object.

Nicole last destroyed zombie.

This is a place where the actual zombie character can be stored and accessed in the script.

And then finally, I need the public health to transform called spawn points.

What?

And obviously we got four of these control and C and B, control the control and fee.

Let's change the numbers on these some two, three and four.

So let's just make sure that we assign these to begin with.

Otherwise, I will undoubtedly forget.

So on the ground, you simply need to assign these spawn points.

And the spawn points are not going to move so they can actually be set to static.

OK, since they're not going to move, they don't have any rendering elements anyway, they're only

transforms.

OK, so what we need to do now in the well, actually, I think we need some more elements.

We need the character to look at the player.

So we need access to our actual player.

I think actually I do like do I not have player already?

Target exclude.

No, I don't have the player on the here, so public health type transform old player.

Then we now have a private integer.

Number.

I'm simply going to call spot the equal one to begin with.

This is going to iterate through if it's one, two, three or four.

It will line up with spawn point one, two, three or four.

Then a private transform this just so that I can store the value of the next available slot.

OK.

And then finally, a new wait for seconds.

When the call.

I'm going to call it schwarm time.

OK, equals a new wait for seconds, lasts exactly one second.

So now in the start, when they want to do is call a new function, I'll call it simply time countdown.

We'll be using this later.

The time countdown will add a timer.

From here, we can also call a lot of other functions.

Don't need to run in the update.

The update call is called once per frame.

So if you run in 60 frames per second, it would be called 60 times a second, whereas a custom function,

you can get that to run.

Let's say once a second if you want.

And that's what we're going to do.

So I want my own function now called time count now.

So that's going to be a void time countdown.

And from here, I can now start a new Kurichi, I will call time delay.

So as it come down to my cortines, I'll do this one slightly above this.

No, actually, I'll do it below these deaths.

I numerators.

So I enumerator full time delay.

I'm going to run my yield return and it's going to be sporn time.

OK, so in the words us once per second.

So what is it like to start coroutine?

Why is it?

The names start, Curtin doesn't exist.

Why not?

Oh, yeah, spelt it wrong, of course.

Yeah, and.

Basically, on the on the start, we're running this function and then the function is going to loop

again and again, so it's basically going to run this coroutine, it's going to force it to only run

every once per second.

All right.

Which is optimized for mobile.

Not everything has to run every frame.

OK, so inside of our time delay, we're going to say, and time countdown, that's going to force it

back to that custom function that we have.

And so it's going to be on a constant loop.

It's going to run over every second.

And then we're going to do check for animes, another custom function that we're going to write in the

second.

So I'm just wondering where to put this, I might put it just below shoot so void.

Check for Miss.

OK.

And whenever we shoot a zombie, we have zombies on screen.

We want the minus that number.

OK, so if we get a zombie, we're simply going to say as some BS on screen, minus, minus.

So we know we've killed a zombie.

So then in the check for enemies, you can actually check that.

So we can say if zombies on screen.

Less than two in this case, then we can do something.

OK, so in this case, we're going to do another function within this cold check spots so that we can

find what what is the next available sporn spot.

Let's do that first before we do anything else.

We'd check sports.

OK, and the checks box is simply going to say if a spot is equal to one and next available slot.

Is going to equal spawn spot one or spawn point one and copy this control and see control and B, control

and the and once again, control and vs.

Now I'm in the same spot is equal to two.

Then it's going to equal spawn point to equal to three, then it's going to equal three.

And if it's four, it's going to equal spawn point four.

So notice we're just using this one variable of next available slot, but we keep changing its position

based on whatever this spot is reading.

It's now back up to our check for Randomise.

I'm going to say, if last destroyed ZOMBI is not equal.

All right, so it's two equals.

It means is equal to a value.

If it's exclamation mark, which is a not equal, it's checking if it isn't equal to no.

That's effectively saying as long as that slope is not empty.

So it's actually filled with some kind of zombie.

If that's the case, then we're going to say last destroyed zombie dot transform dot position is equal

to the next available slot dot.

Position so it moves that zombie into that place, and then we have to iterate through the spots now,

so we're going to say if spot is less than for just space there, and we're simply going to increase

the spot amount, we're going to increment it.

OK.

OK.

However, if spot is equal to four.

So we've reached the limit.

We're going to return back to the first one to get spot equals one.

All right.

So it's an endless loop that keeps going around.

And then we're going to get our last destroyed zombie to actually face up player.

So last destroyed zombie darts transformed.

Don't look at what is it going to look at.

It's going to look at the player.

Notice only runs once or only runs on one frame.

Be careful not to use your look at over multiple frames, you know, otherwise your your any animations

are really weird.

We only need it to look at the play once.

And then finally, we just need to switch it up.

OK, so lost, destroyed zombie darts set active to true.

And it will basically reappear again.

And then finally, when we come up to where we're shooting the zombie, we have to basically set our

zombie to the last destroyed zombie.

So we're going to say last destroyed zombie equals hit dart transform.

Dart game object.

Whichever zombie would just hit basically it up, that will then get passed into that last destroyed

zombie slot.

And then when we're checking the zombies, as soon as we spawned a zombie back then, we simply need

to say zombies on screen.

Plus plus, we send it back to two, otherwise we're going to get an endless loop of zombies and.

So let's save this and see what happens at the moment.

So on the ground, just check for any missing.

Yep, got on that player.

I'll use main camera that's flying into the play slot.

So let's just check this now.

So try it in this character, so he goes down.

OK.

He appeared in the back there, something happened.

Oh, is there as well.

And now what's happening is because of the delay and it is working, but obviously, because I've delayed

the destruction of the zombie by two seconds, it's actually spawning instantly and then basically killing

it at the new position.

OK, so I need to make sure that my zombies on screen minus minus is not happening here.

If I just take this out, control X quote, I'm actually going to do it in the zombie death, OK?

As soon as it's switched the zombie off, then I can do that.

Control the movie.

Safe.

Let's check it now.

So let's try it again.

Kill this guy.

Then he appears OK there.

Kill this guy.

Is there try and kill that guy.

He appears over there in the top, the top left.

Kill this guy and he is there in the top right.

OK, so it's basically switching them on and off.

But at the moment, they're not targeting me.

They're not walking towards me.

So we need to fix that.

Now, in the anime move, if it's a zombie, we're running this move to this start function only gets

called right at the beginning of the game when when the zombies first switched on.

We need to call this from another script.

So to do that, we're simply going to make this void public.

So it's available, all the scripts.

So.

Now that we have access to this, we can then call it OK, so and as soon as we spawn one of these creatures

last destroyed somebody selected to true and we're simply going to say blast destroyed zombie darts,

transform dart game object.

But I don't think I need that.

It is it is a game object, isn't it?

So don't get components.

And the component I want is basically the script, the enemy move.

So I'm going to type and then we move this recognizes it now open and close brackets.

And then from there, I can press and call any of the functions.

And I simply called it move two.

So let's call that move to.

Yeah, we go and then semicolon on the end.

So we're effectively calling that function.

So in the end, agent destination to the player target top position.

Say that.

And now I can test this out.

So I think this time I'll shoot the zombie on the left.

Shoot the zombie on the right.

Now notice that the zombies are now walking toward me again.

Good.

Should this some be this one I missed?

And that guy's got to be on the tombstone.

OK, good.

We've got an endless wave of zombies or at least two zombies.

So obviously we're going to put more zombies in a little bit later.

We know that we've got a system that now works great.

And in the next video, we're going to do the same for the bats and the ghosts.

However, if you want to give that a go yourself, by all means, give it give it a go if you like.

But I'm going to show you how that works in the next video.

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