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 we want some of these enemies to actually be switched off to begin with and then be switched on
with code.
This way you don't start with all the enemies in the scene, all move in at the exact same speed.
So what we've got our enemies and we've got, for example, bats.
Let's just leave.
One of the bots actually switched on.
So let's take that and just totally switch some of them off.
So we've only got one to begin with.
And with our ghosts, maybe we don't have any go on to begin with and switch them on later.
And then with our zombies, perhaps we'll start with just one zombie switched on to begin with.
OK.
So what we really have to do there is just basically shoot two characters to begin with, and then we're
going to spawn the rest.
And so in a main script, we actually have a pause that lasts roughly about three seconds, which I
think is an effective time in between switching various characters on and off again so we can do that.
So I'm just going to leave myself a comment.
So.
Well, actually, I put switching on enemies.
So we need to be able to attach the enemies to the script, so public often came object.
No, we'll call this zombie one.
No, I'll just copy and paste that control and C. control and B, control me and then I can have zombie
two and zombie three.
Remember, we've already got one switched on, so we don't need four of them.
OK.
And then control them.
V again, this time will say ghost one.
Drones say they control and be controlled.
They go to three and four.
And then we've also got our part as well, so we could say, well, no, we've already got one of the
but switched on, so we only need three buttons, control and see from very controlled base.
Now we can have about two and three.
OK, and so that will allow us then to attach them and in fact, I'm going to attach them now, so I
don't forget.
So let's just wait for that to compile.
Then on the ground, we can now see all these empty game slots.
So Zombie basically want to attach the ones that are switched off.
So Zombie wan zombie to zombie three.
Then we've got nine ghosts.
This is all four ghosts.
Just make sure that you don't double up or anything.
They're all individual items.
And because we know we're pulling these, we're never going to have more than these characters.
This is how we can do this in the script.
We're not dynamically spawning new characters.
There we go.
All right.
So we've got those touched.
And so in the start, we've got our time countdown.
But I'm going to now call a new coroutine that's going to be called load ennemies.
Let's say start coroutine load enemies.
OK, runs on the start.
Only has to run once.
So let's go down to the very bottom of the script.
A new enumerator load enemies.
And I'm going to wait for that three seconds, so I'm going to say yield, return, reload.
Pause over this.
That will wait now three seconds before I switch on these other objects and we say zombie one, so seductive
to true.
It's going to switch that one on and then the might also switch in the baton.
So that's one.
So seductive to true.
And then I might have a pause again, so yield, return, reload, pause.
Let's say we switch on the ghost this time.
So ghost one seductive to true.
I switch on another zombie zombie to the seductive.
True.
And then once again, I might have a pause so control and see control and they will wait three seconds
now and the switch on Northcoast Switch on my last ZOMBI, but I'm also going to switch on the bat as
well.
But to seductive, too.
True.
And then finally, I want another porc troll and see troll envy.
So now I want my two final ghosts.
So Ghost three and Ghost four.
And then we should also have but three as well.
All right.
That will effectively switch all the characters on.
So three, six, nine, 12.
So over a period of 12 seconds, we'll switch them on.
So if we have 30 seconds, we've effectively loaded all of the characters within half of the level.
So let's save that.
Well, now change my level time limit to 30 again.
Let's just test this out, make sure that this works.
OK, so we've got that bat and a zombie and we've got another bat and another zombie and then another
zombie and ghost.
Another ghost.
That's why we go in the building now.
And all the characters low didn't notice that there were all the different speeds that.
All right.
Excellent.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.