All language subtitles for 13. Spawning Enemies Automatically

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
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
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian Download
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,256 --> 00:00:01,280 In a survivor 2 00:00:01,536 --> 00:00:02,816 Style game 3 00:00:03,072 --> 00:00:06,400 We obviously aren't going to be placing the enemies man 4 00:00:06,912 --> 00:00:08,192 I actually need to be spun 5 00:00:08,448 --> 00:00:08,960 During 6 00:00:09,216 --> 00:00:09,728 The game 7 00:00:09,984 --> 00:00:12,288 So what we're going to do in this lesson is working 8 00:00:12,544 --> 00:00:13,056 Create 9 00:00:14,080 --> 00:00:14,848 Node 10 00:00:15,104 --> 00:00:18,944 Second spawn the enemies in regular around the player 11 00:00:19,200 --> 00:00:21,248 And that's going to allow us to play the game 12 00:00:21,504 --> 00:00:23,808 Indefinitely at least until we build 13 00:00:24,320 --> 00:00:25,600 Other game places 14 00:00:26,112 --> 00:00:28,928 So what I'm going to do as I'm going to get control and the Creed and you know 15 00:00:29,952 --> 00:00:31,488 Let me just talk a little bit about 16 00:00:31,744 --> 00:00:33,792 How I decide to make a new notes for 17 00:00:34,560 --> 00:00:36,096 Every piece of distinct 18 00:00:36,352 --> 00:00:37,120 Functionality 19 00:00:37,376 --> 00:00:38,400 That handles 20 00:00:38,656 --> 00:00:40,704 On realm of responsibility 21 00:00:40,960 --> 00:00:44,032 Should be a note at least that's how I 22 00:00:44,800 --> 00:00:47,872 So when you need something like an enemy spawn 23 00:00:48,128 --> 00:00:48,640 Behave 24 00:00:48,896 --> 00:00:51,456 I would recommend against for instance 25 00:00:51,712 --> 00:00:55,296 Shoving all of your code on let's say this meme 26 00:00:55,552 --> 00:00:57,344 Why because this mean 27 00:00:57,600 --> 00:01:00,525 Is going to have all of the nodes that are necessary for the game 28 00:01:00,527 --> 00:01:02,875 Subtitled by online-courses.club We compress knowledge for you! 29 00:01:02,876 --> 00:01:01,952 And if you start 30 00:01:02,208 --> 00:01:04,000 Putting a bunch of disparate functionality 31 00:01:04,256 --> 00:01:05,280 Add the main now 32 00:01:05,792 --> 00:01:09,888 You're going to get a lot of different concepts and different responsibility 33 00:01:11,168 --> 00:01:11,936 Together 34 00:01:12,192 --> 00:01:18,336 Which is going to become very unmaintainable one thing that you should keep in mind when you're making software generally is 35 00:01:18,592 --> 00:01:20,128 Single responsibility principle 36 00:01:20,384 --> 00:01:22,176 Which basically means each no 37 00:01:22,432 --> 00:01:22,944 Should do 38 00:01:23,200 --> 00:01:24,480 One thing and 39 00:01:24,736 --> 00:01:25,760 Sort of a matter of debate 40 00:01:26,016 --> 00:01:27,552 It's up for interpretation 41 00:01:27,808 --> 00:01:29,344 But it's just a guiding 42 00:01:30,112 --> 00:01:31,136 So in our case 43 00:01:31,392 --> 00:01:34,464 The main node what is it single responsibility 44 00:01:34,720 --> 00:01:36,256 It single responsibility has been 45 00:01:36,512 --> 00:01:39,840 A container that brings all of the game 46 00:01:40,096 --> 00:01:40,608 Together 47 00:01:40,864 --> 00:01:43,424 The single responsibility of the basic enum 48 00:01:43,936 --> 00:01:44,960 Is to provide 49 00:01:45,216 --> 00:01:47,520 The enemy behaviour that's necessary 50 00:01:47,776 --> 00:01:48,544 4.com 51 00:01:49,056 --> 00:01:51,872 So on and so forth and single responsibility of a child map 52 00:01:52,128 --> 00:01:52,640 Is 2 53 00:01:52,896 --> 00:01:53,664 Render 54 00:01:53,920 --> 00:01:55,712 Is it going to take the same approach 55 00:01:55,968 --> 00:01:57,760 When we create an enemy spawn 56 00:01:58,016 --> 00:01:59,296 We want to have a note 57 00:01:59,552 --> 00:02:01,088 There has the single responsibility 58 00:02:01,344 --> 00:02:02,368 Of spawner 59 00:02:02,624 --> 00:02:03,136 Enemies 60 00:02:03,392 --> 00:02:04,672 And so if you think about 61 00:02:04,928 --> 00:02:08,256 Your design of your notes rotter and your team structure 62 00:02:08,512 --> 00:02:09,536 That lands 63 00:02:09,792 --> 00:02:14,400 You're actually going to find that you start creating more maintainable and Betis 64 00:02:15,168 --> 00:02:17,472 So let's go ahead and create dad enemy 65 00:02:17,728 --> 00:02:18,240 Spider 66 00:02:18,496 --> 00:02:20,288 So I'm just going to click other note 67 00:02:20,544 --> 00:02:22,592 Right here and by the way control and 68 00:02:22,848 --> 00:02:24,128 To create a new scene 69 00:02:24,384 --> 00:02:25,664 And we're going to 70 00:02:25,920 --> 00:02:26,944 Put the root as 71 00:02:27,200 --> 00:02:27,712 Type 72 00:02:27,968 --> 00:02:28,480 Node 73 00:02:28,736 --> 00:02:30,016 Call this enemy 74 00:02:30,528 --> 00:02:31,040 Spanner 75 00:02:31,552 --> 00:02:33,088 And let's forgot where we 76 00:02:33,344 --> 00:02:33,856 I want to see it 77 00:02:34,112 --> 00:02:36,928 So our same structure is starting to 78 00:02:37,184 --> 00:02:37,696 A little 79 00:02:37,952 --> 00:02:39,488 Unwieldy 80 00:02:40,000 --> 00:02:41,280 Will do some reorganize 81 00:02:41,536 --> 00:02:45,376 Later but for now what I'm going to do is I'm actually going to rename 82 00:02:46,144 --> 00:02:46,656 Enemy 83 00:02:46,912 --> 00:02:47,424 Spawn 84 00:02:47,936 --> 00:02:48,448 Manager 85 00:02:48,960 --> 00:02:52,800 And I might just called us enemy manager instead any manager 86 00:02:53,056 --> 00:02:54,848 And I'm going to create a new folder 87 00:02:55,104 --> 00:02:56,384 Under my seems to act 88 00:02:56,896 --> 00:02:57,664 I'm going to call 89 00:02:57,920 --> 00:02:58,688 Managers 90 00:02:59,200 --> 00:03:00,224 Ok I just manage 91 00:03:00,736 --> 00:03:01,248 Singular 92 00:03:01,504 --> 00:03:02,016 And 93 00:03:02,272 --> 00:03:05,088 Now I'll go ahead and save this my manager seeing 94 00:03:05,344 --> 00:03:05,856 In there 95 00:03:06,112 --> 00:03:07,392 Location so scene 96 00:03:07,904 --> 00:03:08,416 Manager 97 00:03:08,928 --> 00:03:09,696 In here 98 00:03:10,208 --> 00:03:10,976 So save it right there 99 00:03:11,232 --> 00:03:13,792 This is what your scene structure should look like when you said 100 00:03:14,048 --> 00:03:15,584 And I was going to go ahead at Usk 101 00:03:17,120 --> 00:03:19,936 The default should be ok so let's go ahead and click Internet 102 00:03:20,192 --> 00:03:20,704 Ok 103 00:03:20,960 --> 00:03:25,056 So what I'm going to do is I'm going to start deleting these comments because we don't need these anymore 104 00:03:25,312 --> 00:03:27,616 And I'm also not going to use the function 105 00:03:27,872 --> 00:03:28,640 The process 106 00:03:29,152 --> 00:03:30,688 You have to be careful with this because 107 00:03:31,200 --> 00:03:33,248 If the process method is defined 108 00:03:33,504 --> 00:03:34,784 Then that process Med 109 00:03:35,040 --> 00:03:37,856 Will be called every frame even if it doesn't do it 110 00:03:38,368 --> 00:03:40,672 That does add a tiny bit of overhead 111 00:03:40,928 --> 00:03:43,232 So if you just remove the process method 112 00:03:43,488 --> 00:03:44,512 Then that will 113 00:03:44,768 --> 00:03:45,792 Remove that 114 00:03:46,304 --> 00:03:49,632 So unless you need to do something on a frame-by-frame base 115 00:03:49,888 --> 00:03:50,912 Don't have the process 116 00:03:51,168 --> 00:03:52,192 Define ok 117 00:03:52,448 --> 00:03:58,592 So let's do another export variable wine because we need to tell the enemy manager watch anime it should 118 00:03:58,848 --> 00:04:00,128 So let's go ahead and do 119 00:04:01,152 --> 00:04:02,688 Export at the top 120 00:04:02,944 --> 00:04:03,968 We're going to do with our 121 00:04:04,480 --> 00:04:05,248 Basic 122 00:04:05,504 --> 00:04:06,016 Anime 123 00:04:07,296 --> 00:04:07,808 Colin 124 00:04:08,064 --> 00:04:09,344 Type of packs 125 00:04:09,856 --> 00:04:11,392 So again this exposed 126 00:04:11,648 --> 00:04:13,696 Variable in the inspector 127 00:04:13,952 --> 00:04:15,232 And this colour 128 00:04:15,744 --> 00:04:18,815 Tell impact scene tells us that they should be 129 00:04:19,071 --> 00:04:19,839 Type 130 00:04:20,095 --> 00:04:20,607 Scene 131 00:04:20,863 --> 00:04:23,679 You can see that have already got this if I click on other 132 00:04:23,935 --> 00:04:25,727 I've only got a basic anime scene radio 133 00:04:25,983 --> 00:04:27,263 So let's go ahead and 134 00:04:27,519 --> 00:04:28,543 Search in our files 135 00:04:28,799 --> 00:04:30,335 Listen for that basic enemy scene 136 00:04:31,615 --> 00:04:33,407 And then I'm just going to go and round it up 137 00:04:33,663 --> 00:04:34,175 To assign 138 00:04:34,431 --> 00:04:34,943 Perfect 139 00:04:35,199 --> 00:04:38,271 So what kind of things do we need to do for the enemy man 140 00:04:38,783 --> 00:04:39,295 Well 141 00:04:39,551 --> 00:04:42,111 We want to spawn enemies on a certain interval 142 00:04:42,367 --> 00:04:43,135 And so that means that 143 00:04:43,391 --> 00:04:44,415 I want to use a timer 144 00:04:44,671 --> 00:04:45,439 Let's go home 145 00:04:45,695 --> 00:04:46,719 Hit ctrl a 146 00:04:46,975 --> 00:04:49,279 Make sure you have the scene dark highlight 147 00:04:49,535 --> 00:04:50,303 Control 148 00:04:50,815 --> 00:04:52,351 We're going to say timer 149 00:04:52,607 --> 00:04:53,631 Garden adder 150 00:04:53,887 --> 00:04:55,935 And then we're going to turn on auto start 151 00:04:56,191 --> 00:04:57,215 And the wait time 152 00:04:57,471 --> 00:04:59,775 Let's leave it at one second in Seaham 153 00:05:00,543 --> 00:05:01,823 So going back or script 154 00:05:02,079 --> 00:05:03,615 Let's remove this past life 155 00:05:03,871 --> 00:05:06,175 Dollar sign timer again to grab the time 156 00:05:06,431 --> 00:05:07,199 What are we going to do 157 00:05:07,711 --> 00:05:08,991 We want to connect to the time 158 00:05:09,503 --> 00:05:10,271 And then connect 159 00:05:11,295 --> 00:05:12,063 Timer time 160 00:05:12,575 --> 00:05:13,087 Ok 161 00:05:13,343 --> 00:05:15,391 Two new lines between each function 162 00:05:15,903 --> 00:05:16,927 Which means I am 163 00:05:17,183 --> 00:05:18,975 The top here and then funk 164 00:05:19,231 --> 00:05:19,999 On timer 165 00:05:20,511 --> 00:05:21,023 Time out 166 00:05:21,535 --> 00:05:22,815 Now what do we want to do it 167 00:05:23,327 --> 00:05:24,863 Well we want to spawn the enemy 168 00:05:25,887 --> 00:05:26,655 Consideration 169 00:05:26,911 --> 00:05:27,423 Which is that 170 00:05:27,679 --> 00:05:29,983 Presumably we don't want the enemy to spawn 171 00:05:30,495 --> 00:05:31,519 Right on top of the 172 00:05:31,775 --> 00:05:34,847 We want the enemy to spawn I think ideally 173 00:05:35,103 --> 00:05:37,919 Outside of the view of the player 174 00:05:38,175 --> 00:05:42,271 So that it looks like enemies are just organically coming from the distance 175 00:05:42,527 --> 00:05:45,087 I believe this is how vampire survivors works 176 00:05:45,343 --> 00:05:46,111 There are no enemies 177 00:05:46,367 --> 00:05:46,879 Appear 178 00:05:47,135 --> 00:05:50,463 On the screen that's visible they all come from outside the 179 00:05:50,975 --> 00:05:52,511 So that's what we're going to do with 180 00:05:52,767 --> 00:05:53,535 The player 181 00:05:53,791 --> 00:05:57,375 So once again we need to grab a reference to the player so far play 182 00:05:58,911 --> 00:05:59,423 Get 183 00:05:59,679 --> 00:06:02,239 Tree get first node in 184 00:06:03,263 --> 00:06:04,031 And then in 185 00:06:04,287 --> 00:06:04,799 Player 186 00:06:06,079 --> 00:06:07,103 If player 187 00:06:07,615 --> 00:06:08,383 Eagles now 188 00:06:09,407 --> 00:06:10,431 Just going to return 189 00:06:10,943 --> 00:06:16,319 So again you have to be really careful when you're doing things like this because it is possible for this to be me 190 00:06:16,831 --> 00:06:20,159 For example let's say that in a future state we have the player died 191 00:06:20,671 --> 00:06:22,975 Right and then we remove the player from the seams 192 00:06:23,487 --> 00:06:24,255 When that happens 193 00:06:24,511 --> 00:06:26,815 This code may still be able to run 194 00:06:27,071 --> 00:06:28,095 Even when there's no play 195 00:06:29,119 --> 00:06:33,215 You need to be a little bit defensive when your programming you need to make sure 196 00:06:33,471 --> 00:06:35,007 Your cold can still run 197 00:06:35,263 --> 00:06:36,287 Even when 198 00:06:36,543 --> 00:06:38,847 It doesn't have a dependency that you accept 199 00:06:39,103 --> 00:06:40,895 So always keep in mind that 200 00:06:41,151 --> 00:06:47,295 Whenever you're getting a node from the same tree there is almost always a possibility that it won't be there now 201 00:06:47,551 --> 00:06:50,367 When you're doing it in this fashion like dollar sign time 202 00:06:50,879 --> 00:06:55,231 That's acceptable because the general idea is that an encapsulated seen 203 00:06:55,487 --> 00:06:58,303 Like our enemy manager or our basic enemy 204 00:06:58,559 --> 00:07:02,399 Is guaranteed to always have these nodes in the straw 205 00:07:03,423 --> 00:07:05,983 But when you're thinking about a brother game scale 206 00:07:06,239 --> 00:07:09,567 I'm not guaranteed in this code that are playing 207 00:07:10,079 --> 00:07:12,127 Directions something to keep in mind while 208 00:07:12,639 --> 00:07:14,431 So let's pick a random 209 00:07:14,687 --> 00:07:15,455 Location 210 00:07:15,711 --> 00:07:16,479 To spawn 211 00:07:16,735 --> 00:07:17,247 The enemy 212 00:07:17,503 --> 00:07:18,783 In the way that we're going to do that 213 00:07:19,039 --> 00:07:20,063 Is weird is going to 214 00:07:20,319 --> 00:07:21,087 A point 215 00:07:21,343 --> 00:07:23,903 On a circle around the player 216 00:07:24,159 --> 00:07:25,695 So if we go to Prague 217 00:07:25,951 --> 00:07:26,719 Project setting 218 00:07:27,231 --> 00:07:28,511 We go to our display 219 00:07:28,767 --> 00:07:30,559 We can see that our viewport width 220 00:07:30,815 --> 00:07:31,327 Is 221 00:07:31,583 --> 00:07:32,095 64 222 00:07:32,351 --> 00:07:35,167 So we're going to use a circle with a radius of 300 223 00:07:35,679 --> 00:07:36,703 To spawn the enemy 224 00:07:36,959 --> 00:07:40,287 And that's going to make sure that the enemy will not spawn 225 00:07:40,543 --> 00:07:41,567 In the window 226 00:07:41,823 --> 00:07:42,335 Area 227 00:07:42,591 --> 00:07:43,615 So let's crab 228 00:07:44,639 --> 00:07:46,175 Random Direction first 229 00:07:46,431 --> 00:07:47,711 So let's call 230 00:07:47,967 --> 00:07:49,503 Random Direction 231 00:07:50,783 --> 00:07:53,087 Is he going to again we're going to take the car 232 00:07:53,343 --> 00:07:54,111 Vector2 233 00:07:55,647 --> 00:07:56,671 And then we're gonna Road 234 00:07:57,183 --> 00:07:58,463 R&f 235 00:07:59,743 --> 00:08:04,863 And this function by the way is a random function at available in the Global scope that's why we 236 00:08:05,375 --> 00:08:11,519 Call it from here and we can I do round at range 0 and then again we're going to do tell right so again 237 00:08:12,287 --> 00:08:15,103 Give me a vector that rotated in radius 238 00:08:15,359 --> 00:08:16,895 Anywhere from 0 to 2 239 00:08:17,151 --> 00:08:17,919 Otherwise 240 00:08:18,431 --> 00:08:19,711 Known as 241 00:08:20,479 --> 00:08:21,759 Set a random Direct 242 00:08:22,271 --> 00:08:25,855 Let's go ahead and put a constant up here above the x 243 00:08:26,367 --> 00:08:26,879 Can't 244 00:08:27,135 --> 00:08:28,927 What can a CT spawn radius 245 00:08:29,439 --> 00:08:30,207 Is equal to 246 00:08:30,463 --> 00:08:31,231 Let's do 247 00:08:32,511 --> 00:08:33,023 30 248 00:08:33,279 --> 00:08:37,375 So 320 is half of the greatest Dimension of a window 249 00:08:37,631 --> 00:08:39,167 Remember that's 6-ft 250 00:08:39,423 --> 00:08:39,935 Wide 251 00:08:40,191 --> 00:08:41,471 So half of that would be 252 00:08:41,727 --> 00:08:42,495 Inappropriate radio 253 00:08:42,751 --> 00:08:45,823 And then I'm adding 10 to that just to give it a little bit 254 00:08:46,079 --> 00:08:48,127 Buffer space on the edges of the wind 255 00:08:48,383 --> 00:08:49,663 So basically going to be spawn 256 00:08:50,175 --> 00:08:52,479 10 pixels outside the boundary of the window 257 00:08:53,759 --> 00:08:55,039 Select a random Direction 258 00:08:55,295 --> 00:08:58,367 Let's take our so now we need to grab up position 259 00:08:58,623 --> 00:09:00,671 So we'll save our spawn position 260 00:09:01,183 --> 00:09:01,951 Is equal to 261 00:09:02,463 --> 00:09:03,743 Play Adele global 262 00:09:04,255 --> 00:09:05,791 And we're not getting the 263 00:09:06,047 --> 00:09:09,887 Suggestions so I'm going to type this as no to the again 264 00:09:10,143 --> 00:09:11,679 That way we can get the suggestion 265 00:09:11,935 --> 00:09:14,239 Play the global position in the ad 266 00:09:14,495 --> 00:09:16,287 To that position of the player 267 00:09:16,543 --> 00:09:18,335 What we're going to do as we're going to add 268 00:09:18,847 --> 00:09:19,359 The 269 00:09:19,615 --> 00:09:21,663 Random direction in parentheses 270 00:09:22,175 --> 00:09:22,687 X 271 00:09:22,943 --> 00:09:23,455 The Swan 272 00:09:24,223 --> 00:09:25,247 So this Prentice 273 00:09:25,503 --> 00:09:27,551 Might be unnecessary but I like to do that 274 00:09:27,807 --> 00:09:30,111 The group specific mathematical operations 275 00:09:30,367 --> 00:09:33,439 So we want to evaluate this 276 00:09:33,695 --> 00:09:34,719 Location before 277 00:09:34,975 --> 00:09:35,487 Get to the player 278 00:09:35,743 --> 00:09:36,255 What position 279 00:09:36,511 --> 00:09:38,303 That's going to do is that's going to 280 00:09:38,815 --> 00:09:40,863 Go in a random direction from the player 281 00:09:41,375 --> 00:09:42,143 330 282 00:09:42,911 --> 00:09:43,679 Ok so that we 283 00:09:43,935 --> 00:09:45,727 The spine position was actually cream 284 00:09:45,983 --> 00:09:46,751 To the enemy 285 00:09:47,007 --> 00:09:49,055 So we're going to save our enemy 286 00:09:49,311 --> 00:09:50,079 Is equal to 287 00:09:50,335 --> 00:09:52,895 Basic anime scene.in stands 288 00:09:53,919 --> 00:09:55,711 And then we're going to want to 289 00:09:55,967 --> 00:09:56,479 Do you 290 00:09:56,735 --> 00:09:57,247 Get pair 291 00:09:58,271 --> 00:10:00,588 And so we're going to get the parent of the enemy manager 292 00:10:00,589 --> 00:10:02,760 Subtitled by online-courses.club We compress knowledge for you! 293 00:10:02,761 --> 00:10:02,623 Which will be in the main scene 294 00:10:03,391 --> 00:10:04,415 Bad child 295 00:10:04,671 --> 00:10:05,183 Anime 296 00:10:05,439 --> 00:10:06,207 So again 297 00:10:06,463 --> 00:10:08,767 When you instantiate something that creates a note 298 00:10:09,023 --> 00:10:12,095 But it does not put a node into the scene tree you need to tell it 299 00:10:12,351 --> 00:10:13,375 Under which pair 300 00:10:13,631 --> 00:10:14,655 Do you want to add 301 00:10:15,167 --> 00:10:15,679 Vienna 302 00:10:15,935 --> 00:10:17,983 Never going to say enemy that global position 303 00:10:18,239 --> 00:10:19,519 And again it snow 304 00:10:20,031 --> 00:10:23,871 Play tears no Duty so we can do instantiated as no to die up here 305 00:10:24,127 --> 00:10:26,175 Then we can say enemy global position 306 00:10:26,687 --> 00:10:27,455 Is equal to 307 00:10:27,711 --> 00:10:28,223 Spawn 308 00:10:29,247 --> 00:10:32,575 So let's just do a quick recap of what's happening were going to grab the player 309 00:10:32,831 --> 00:10:34,879 And return No Return Reddit 310 00:10:35,135 --> 00:10:35,647 The players 311 00:10:35,903 --> 00:10:39,487 We're going to get a random action by taking the right vector 312 00:10:39,743 --> 00:10:41,791 Which again is at 0 degree 313 00:10:43,583 --> 00:10:44,607 A rotator 314 00:10:44,863 --> 00:10:47,167 Buy a random value between 0 and 2 315 00:10:47,679 --> 00:10:49,215 And they were going to 316 00:10:49,471 --> 00:10:50,751 Take a player position 317 00:10:51,007 --> 00:10:52,799 Add to it that random directions 318 00:10:53,055 --> 00:10:53,567 The spine race 319 00:10:53,823 --> 00:10:55,359 And that will give us the news 320 00:10:55,615 --> 00:10:56,127 Position 321 00:10:56,383 --> 00:10:58,175 And then we instantiate the end 322 00:10:58,431 --> 00:10:58,943 Add 323 00:10:59,199 --> 00:11:03,039 To the parent of the enemy manager which is going to be main 324 00:11:03,295 --> 00:11:04,063 And then 325 00:11:04,319 --> 00:11:05,855 We assign the Global 326 00:11:06,623 --> 00:11:07,647 The Swan position 327 00:11:07,903 --> 00:11:08,415 We calculate 328 00:11:08,927 --> 00:11:10,719 So now I'm going to go over to my main 329 00:11:11,231 --> 00:11:12,511 Click on the TV 330 00:11:12,767 --> 00:11:13,791 The top so I can see WhatsApp 331 00:11:14,047 --> 00:11:15,839 Also I'm going to get rid of a stye 332 00:11:16,351 --> 00:11:16,863 Bye 333 00:11:17,119 --> 00:11:18,399 Clicking on the timer 334 00:11:18,655 --> 00:11:20,447 Unchecking the tilemap at the bottom 335 00:11:20,703 --> 00:11:23,263 If that doesn't appear for you then that's good I think 336 00:11:23,519 --> 00:11:26,847 Little bit baggy because I'm an RC one instead 337 00:11:27,103 --> 00:11:27,871 The full release 338 00:11:28,383 --> 00:11:30,943 I'm going to go ahead and send you a child's under me 339 00:11:31,455 --> 00:11:32,223 Any manager 340 00:11:32,479 --> 00:11:35,551 I'm going to go ahead in drag the my manager up to be the first Choice 341 00:11:36,063 --> 00:11:38,111 And I'm going to delete all of these other basic 342 00:11:38,367 --> 00:11:38,879 So I can 343 00:11:39,135 --> 00:11:42,207 Click on the first one to hold shift and click on the last one 344 00:11:42,463 --> 00:11:43,487 Anime can hit the door 345 00:11:43,999 --> 00:11:45,791 I'm a keyboard and then 346 00:11:46,303 --> 00:11:47,071 And now I've 347 00:11:48,607 --> 00:11:52,703 And what I'm going to do is I'm going to move the player into the centre of the arena solo 348 00:11:52,959 --> 00:11:54,751 You take the player hitting w on my 349 00:11:55,263 --> 00:11:56,031 Ender Dragon 350 00:11:57,567 --> 00:11:58,847 Store in clane 351 00:11:59,359 --> 00:12:01,407 Ok so now we've got a bunch of enemies 352 00:12:01,663 --> 00:12:02,431 Coming out us 353 00:12:02,687 --> 00:12:04,223 We can still see them 354 00:12:04,479 --> 00:12:04,991 Spawning 355 00:12:06,015 --> 00:12:09,343 So we probably need to increase that radius so it's go back to the 356 00:12:09,599 --> 00:12:10,879 What's turn on radio 357 00:12:12,415 --> 00:12:12,927 And then 358 00:12:13,183 --> 00:12:13,695 Let's try 359 00:12:17,279 --> 00:12:19,583 And I'm also going to go to my debugs 360 00:12:19,839 --> 00:12:20,351 And 361 00:12:20,607 --> 00:12:22,399 Turn off visible collision shape 362 00:12:22,911 --> 00:12:23,679 So that way we 363 00:12:24,191 --> 00:12:25,471 Just see everything 364 00:12:26,239 --> 00:12:26,751 Ok 365 00:12:27,007 --> 00:12:27,775 So you should be 366 00:12:28,287 --> 00:12:30,335 Starting to see how this is going to 367 00:12:30,591 --> 00:12:32,383 Like we just get a constant 368 00:12:32,895 --> 00:12:33,663 Stream of enum 369 00:12:34,943 --> 00:12:38,527 And I'm going to increase this really it's just a little bit more let's 23cm 370 00:12:39,295 --> 00:12:40,831 And that should prevent any 371 00:12:41,087 --> 00:12:42,111 Pub in net worth 372 00:12:42,623 --> 00:12:47,743 Now you're going to notice about your problems for instance they are spawning outside of our Arena 373 00:12:47,999 --> 00:12:50,815 We still have lots of work to do on the world general 374 00:12:51,071 --> 00:12:51,583 But 375 00:12:51,839 --> 00:12:54,399 The the approach that were taking at the moment 376 00:12:54,655 --> 00:12:58,239 We're going to get the systems of the game implemented in a row 377 00:12:58,495 --> 00:12:59,007 Fashion 378 00:12:59,263 --> 00:13:01,567 And then we're going to gradually polish it 379 00:13:02,591 --> 00:13:03,615 Ok so that's a base 380 00:13:03,871 --> 00:13:04,895 Enemy spawn 24281

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