Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:03,690 --> 00:00:09,540
Now we want some of these enemies to actually be switched off to begin with and then be switched on
2
00:00:09,540 --> 00:00:10,350
with code.
3
00:00:10,470 --> 00:00:15,630
This way you don't start with all the enemies in the scene, all move in at the exact same speed.
4
00:00:16,740 --> 00:00:20,460
So what we've got our enemies and we've got, for example, bats.
5
00:00:20,460 --> 00:00:21,150
Let's just leave.
6
00:00:21,150 --> 00:00:22,620
One of the bots actually switched on.
7
00:00:23,250 --> 00:00:26,300
So let's take that and just totally switch some of them off.
8
00:00:26,310 --> 00:00:28,080
So we've only got one to begin with.
9
00:00:28,860 --> 00:00:35,430
And with our ghosts, maybe we don't have any go on to begin with and switch them on later.
10
00:00:35,940 --> 00:00:41,010
And then with our zombies, perhaps we'll start with just one zombie switched on to begin with.
11
00:00:41,520 --> 00:00:41,880
OK.
12
00:00:42,240 --> 00:00:47,670
So what we really have to do there is just basically shoot two characters to begin with, and then we're
13
00:00:47,670 --> 00:00:48,810
going to spawn the rest.
14
00:00:49,250 --> 00:00:58,140
And so in a main script, we actually have a pause that lasts roughly about three seconds, which I
15
00:00:58,140 --> 00:01:04,650
think is an effective time in between switching various characters on and off again so we can do that.
16
00:01:05,610 --> 00:01:07,890
So I'm just going to leave myself a comment.
17
00:01:07,890 --> 00:01:08,610
So.
18
00:01:11,250 --> 00:01:14,820
Well, actually, I put switching on enemies.
19
00:01:18,000 --> 00:01:24,740
So we need to be able to attach the enemies to the script, so public often came object.
20
00:01:25,390 --> 00:01:28,620
No, we'll call this zombie one.
21
00:01:30,660 --> 00:01:37,200
No, I'll just copy and paste that control and C. control and B, control me and then I can have zombie
22
00:01:37,200 --> 00:01:38,160
two and zombie three.
23
00:01:38,470 --> 00:01:41,490
Remember, we've already got one switched on, so we don't need four of them.
24
00:01:43,020 --> 00:01:43,480
OK.
25
00:01:43,540 --> 00:01:44,760
And then control them.
26
00:01:44,760 --> 00:01:48,670
V again, this time will say ghost one.
27
00:01:52,210 --> 00:01:55,990
Drones say they control and be controlled.
28
00:01:56,120 --> 00:01:58,780
They go to three and four.
29
00:02:03,550 --> 00:02:08,710
And then we've also got our part as well, so we could say, well, no, we've already got one of the
30
00:02:08,710 --> 00:02:16,330
but switched on, so we only need three buttons, control and see from very controlled base.
31
00:02:16,360 --> 00:02:17,890
Now we can have about two and three.
32
00:02:21,000 --> 00:02:28,200
OK, and so that will allow us then to attach them and in fact, I'm going to attach them now, so I
33
00:02:28,200 --> 00:02:28,990
don't forget.
34
00:02:30,210 --> 00:02:32,430
So let's just wait for that to compile.
35
00:02:33,850 --> 00:02:38,370
Then on the ground, we can now see all these empty game slots.
36
00:02:38,370 --> 00:02:43,140
So Zombie basically want to attach the ones that are switched off.
37
00:02:43,320 --> 00:02:48,810
So Zombie wan zombie to zombie three.
38
00:02:49,230 --> 00:02:50,940
Then we've got nine ghosts.
39
00:02:51,720 --> 00:02:53,430
This is all four ghosts.
40
00:02:55,290 --> 00:02:57,360
Just make sure that you don't double up or anything.
41
00:02:57,360 --> 00:02:59,370
They're all individual items.
42
00:03:00,930 --> 00:03:04,770
And because we know we're pulling these, we're never going to have more than these characters.
43
00:03:05,190 --> 00:03:07,830
This is how we can do this in the script.
44
00:03:08,160 --> 00:03:10,920
We're not dynamically spawning new characters.
45
00:03:13,290 --> 00:03:13,830
There we go.
46
00:03:14,100 --> 00:03:14,490
All right.
47
00:03:14,490 --> 00:03:16,170
So we've got those touched.
48
00:03:17,400 --> 00:03:22,170
And so in the start, we've got our time countdown.
49
00:03:22,170 --> 00:03:27,690
But I'm going to now call a new coroutine that's going to be called load ennemies.
50
00:03:27,840 --> 00:03:33,150
Let's say start coroutine load enemies.
51
00:03:36,870 --> 00:03:38,400
OK, runs on the start.
52
00:03:38,490 --> 00:03:39,960
Only has to run once.
53
00:03:40,100 --> 00:03:44,070
So let's go down to the very bottom of the script.
54
00:03:48,640 --> 00:03:53,200
A new enumerator load enemies.
55
00:03:57,620 --> 00:04:05,330
And I'm going to wait for that three seconds, so I'm going to say yield, return, reload.
56
00:04:06,890 --> 00:04:08,390
Pause over this.
57
00:04:09,680 --> 00:04:18,200
That will wait now three seconds before I switch on these other objects and we say zombie one, so seductive
58
00:04:19,010 --> 00:04:19,730
to true.
59
00:04:19,940 --> 00:04:24,290
It's going to switch that one on and then the might also switch in the baton.
60
00:04:24,470 --> 00:04:25,940
So that's one.
61
00:04:26,650 --> 00:04:29,180
So seductive to true.
62
00:04:31,830 --> 00:04:39,690
And then I might have a pause again, so yield, return, reload, pause.
63
00:04:42,590 --> 00:04:44,900
Let's say we switch on the ghost this time.
64
00:04:45,290 --> 00:04:50,040
So ghost one seductive to true.
65
00:04:51,900 --> 00:04:56,840
I switch on another zombie zombie to the seductive.
66
00:04:59,050 --> 00:04:59,370
True.
67
00:05:01,510 --> 00:05:08,890
And then once again, I might have a pause so control and see control and they will wait three seconds
68
00:05:08,890 --> 00:05:15,790
now and the switch on Northcoast Switch on my last ZOMBI, but I'm also going to switch on the bat as
69
00:05:15,790 --> 00:05:16,030
well.
70
00:05:17,110 --> 00:05:20,510
But to seductive, too.
71
00:05:20,890 --> 00:05:21,240
True.
72
00:05:23,570 --> 00:05:29,710
And then finally, I want another porc troll and see troll envy.
73
00:05:30,040 --> 00:05:34,930
So now I want my two final ghosts.
74
00:05:34,930 --> 00:05:37,780
So Ghost three and Ghost four.
75
00:05:41,010 --> 00:05:45,500
And then we should also have but three as well.
76
00:05:46,220 --> 00:05:46,490
All right.
77
00:05:46,730 --> 00:05:50,340
That will effectively switch all the characters on.
78
00:05:50,780 --> 00:05:52,470
So three, six, nine, 12.
79
00:05:52,490 --> 00:05:55,730
So over a period of 12 seconds, we'll switch them on.
80
00:05:55,740 --> 00:06:01,580
So if we have 30 seconds, we've effectively loaded all of the characters within half of the level.
81
00:06:04,830 --> 00:06:05,940
So let's save that.
82
00:06:10,350 --> 00:06:14,040
Well, now change my level time limit to 30 again.
83
00:06:16,050 --> 00:06:18,330
Let's just test this out, make sure that this works.
84
00:06:21,470 --> 00:06:28,370
OK, so we've got that bat and a zombie and we've got another bat and another zombie and then another
85
00:06:28,370 --> 00:06:29,480
zombie and ghost.
86
00:06:30,590 --> 00:06:31,550
Another ghost.
87
00:06:32,900 --> 00:06:35,230
That's why we go in the building now.
88
00:06:35,360 --> 00:06:39,770
And all the characters low didn't notice that there were all the different speeds that.
89
00:06:42,390 --> 00:06:42,810
All right.
90
00:06:42,840 --> 00:06:43,320
Excellent.
7727
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.