Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Now I'm going to show you how to get the system to work with bats and ghosts as well so you can spawn
in as many as you like.
If you've managed to do it yourself, that's great.
OK, but I'm going to show you how to do it in this video.
So I'm just going to switch these two items back on again and we're going to go back into the script.
OK, so we've got zombies on screen.
We also need a public integer for bats on screen.
Let's just make them to to begin with, while we're testing public integer and let's call it ghosts
on screen.
It's also make those tours well, OK, now I'm going to copy this element.
Drone C control V control and V.
We need a slot to store the last destroyed, but in the last destroyed ghost.
So effectively as those in memory so that you can switch their positions and switch them back on again
spawn points, we've already done, we've already sent that player one next available slot is all sorted.
And so we spawn time.
So down into our chute where we've got this last destroy zombie equals hit or transformed game object,
let's do a control and see and let's just pace this Volin.
Let's do blast destroyed bat equals hit, not transform, not game object.
And in this one, it's going to be last destroyed ghost.
OK, we know that we want to reduce their number after they were taken off the screen, so I'm going
to say.
What's on screen minus minus for this one?
Ghosts on screen.
Well, I pressed the ghosts on screen, minus minus.
We go.
And now in a check for enemies, you can actually just take all of this master control and see that
I can do a control in V control and be now safe.
But on screen,
less than two.
Once again, I'm going to check the spots.
We're going to say lost.
If lost, destroyed bat and I think is comfortably is not equal to null.
And we're going to say last destroyed but transformed up position equals next available slot in the
movie and iterate through the slots.
Say less destroyed but don't transform.
Look at player lost.
Destroyed by said active to true.
And then we don't need this because this is only called on the zombie.
So let's get rid of this line and then we're going to say.
But on screen plus.
Do the same with ghosts, sort of ghosts on screen.
If lost, destroyed, ghost is not equal to no and less destroyed.
Ghosts don't transform.
The position is equal to the next available slot.
Iterate through the spots and then lost, destroyed ghost.
Look, a player must destroy ghosts, which again.
And we don't need the lost destroyed zombie bit.
So then we're going to see ghosts on screen.
Plus, plus.
All right.
That's it.
That's uh.
That's all we need to do.
Really easy.
Let's wait for that to compile and then we need some more butts and ghosts, so let's just duplicate
one of the bats and say we have it back here somewhere and then let's also duplicate one of the ghosts.
This one over here, it's a little bit closer to the player and if it can.
Looking at the player.
And we got plenty of characters now and just double check that there's no missing slots on me ground,
which there isn't.
OK, let's double check list now.
That's is about to begin with, and we get a new battle over there, GOST is getting very close.
Seems this ghost is too close to hit, which is interesting.
Did it.
These two have finally reached me.
And we've got an endless wave of objects.
So we've got the ghosts, we got the bats and we got the zombies.
Now notice that we've only got two of each.
So we've effectively got six characters on screen.
But because they're constantly pooling, it looks like we've got loads and loads of characters in the
game at any point in the game's life and never going to have more than six characters.
So that's a great way to optimize a mobile game.
But we want more than six characters.
The moment, it's far too easy.
And so in the next video, we're going to add a few more characters and we're going to start working
on the damage system to the play.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.