WEBVTT 1 00:00:04.221 --> 00:00:09.022 Realistic Basics Unreal Engine Blueprint Basics 2 00:00:09.022 --> 00:00:11.636 GCC Academy 3 00:00:27.242 --> 00:00:28.392 Hello 4 00:00:28.392 --> 00:00:32.200 I am Tak Gwang-wook, and I will be teaching the Blueprint lecture 5 00:00:32.200 --> 00:00:34.600 Blueprint is a system that you will cover a lot 6 00:00:34.600 --> 00:00:37.360 when working with Unreal Engine 7 00:00:37.360 --> 00:00:39.710 It refers to Unreal's unique design system 8 00:00:39.710 --> 00:00:44.400 that designs and devises complex actors 9 00:00:44.400 --> 00:00:46.750 This Blueprint can be added to operate 10 00:00:46.750 --> 00:00:49.919 functions as well as appearances 11 00:00:49.919 --> 00:00:52.019 In this session, we will focus on 12 00:00:52.019 --> 00:00:54.200 the functions of Blueprint 13 00:00:54.200 --> 00:00:56.700 First, we will take some time to become familiar 14 00:00:56.700 --> 00:00:58.880 with the visual script of Blueprint 15 00:00:58.880 --> 00:01:01.080 and learn about the basic knowledge 16 00:01:01.080 --> 00:01:03.217 and theory for creating functions 17 00:01:03.901 --> 00:01:07.641 Understanding Blueprints and Blueprint Scripting 18 00:01:07.879 --> 00:01:10.529 Normally, the functions of a Blueprint Actor 19 00:01:10.529 --> 00:01:13.080 are created through coding 20 00:01:13.080 --> 00:01:15.180 Programmers create them using 21 00:01:15.180 --> 00:01:18.160 coding syntax as if they were writing text 22 00:01:18.160 --> 00:01:23.040 Unreal Engine provides a way for planners or artists 23 00:01:23.040 --> 00:01:26.080 who are not familiar with coding to create Blueprint functions 24 00:01:26.080 --> 00:01:30.130 using a method called visual scripting 25 00:01:30.130 --> 00:01:33.959 so that they can implement functions very easily 26 00:01:33.959 --> 00:01:35.720 As you can see in this picture 27 00:01:35.720 --> 00:01:38.770 the visual scripting method is a method 28 00:01:38.770 --> 00:01:41.400 of creating a function that works with a visual interface 29 00:01:41.400 --> 00:01:45.320 that is, by connecting blocks 30 00:01:45.320 --> 00:01:49.470 called modes with lines 31 00:01:49.470 --> 00:01:53.559 to visually see the flow of data 32 00:01:53.559 --> 00:01:57.680 In particular, the visual scripting method of Unreal Engine's Blueprint 33 00:01:57.680 --> 00:01:59.830 provides more coding-related functions 34 00:01:59.830 --> 00:02:02.839 than general Blue Coding 35 00:02:02.839 --> 00:02:06.400 so it is very powerful to the point 36 00:02:06.400 --> 00:02:11.399 that you can easily create a project of a certain scale 37 00:02:11.399 --> 00:02:13.639 with only Blueprint without direct coding 38 00:02:13.639 --> 00:02:15.989 First, let's learn how to use 39 00:02:15.989 --> 00:02:17.960 Blueprints 40 00:02:17.960 --> 00:02:21.000 When programmers learn to code 41 00:02:21.000 --> 00:02:24.000 they usually start by creating a function 42 00:02:24.000 --> 00:02:25.919 that prints Hello World 43 00:02:25.919 --> 00:02:28.119 Let's create a function 44 00:02:28.119 --> 00:02:29.839 that prints Hello World 45 00:02:29.839 --> 00:02:31.520 I opened the basic level 46 00:02:31.520 --> 00:02:35.320 Here, I'm going to learn about blueprints simply 47 00:02:35.320 --> 00:02:38.520 Open the Content Drawer 48 00:02:38.520 --> 00:02:42.399 and create a folder in the Content folder 49 00:02:42.399 --> 00:02:45.299 I'm going to create a folder 50 00:02:45.299 --> 00:02:46.919 called BP 51 00:02:46.919 --> 00:02:49.479 It's short for Blueprint 52 00:02:49.479 --> 00:02:51.919 We're going to learn inside this folder 53 00:02:51.919 --> 00:02:58.279 Right-click on a space and select Blueprint Class 54 00:02:58.279 --> 00:03:01.753 A window will pop up asking you to select a parent class 55 00:03:01.753 --> 00:03:03.919 Simply put 56 00:03:03.919 --> 00:03:07.320 when you create a blueprint in Unreal Engine 57 00:03:07.320 --> 00:03:10.119 it says to take a specific function that's already been created 58 00:03:10.119 --> 00:03:13.440 and add it to create a function 59 00:03:13.440 --> 00:03:17.199 to create a blueprint 60 00:03:17.199 --> 00:03:20.360 This method of making something by taking what was previously made 61 00:03:20.360 --> 00:03:23.759 is usually called inheritance 62 00:03:23.759 --> 00:03:27.559 So, you can think of it as a process of creating a new function 63 00:03:27.559 --> 00:03:29.160 by inheriting a class 64 00:03:29.160 --> 00:03:34.399 So you can think of it as choosing what to inherit 65 00:03:34.399 --> 00:03:38.399 We will inherit the Actor class at the very top 66 00:03:38.399 --> 00:03:40.600 This Actor class is 67 00:03:40.600 --> 00:03:45.350 a class that has the function of 68 00:03:45.350 --> 00:03:47.080 being placed in the level space 69 00:03:47.080 --> 00:03:49.559 So, since we are going to place it in this level 70 00:03:49.559 --> 00:03:53.600 we will select the Actor class 71 00:03:53.600 --> 00:03:57.839 Then, the inheritance is received, and a blueprint is created 72 00:03:57.839 --> 00:04:04.520 We'll call it BP_Basic 73 00:04:04.520 --> 00:04:06.570 Then, a blueprint actor 74 00:04:06.570 --> 00:04:08.880 that inherits the Actor class is created 75 00:04:08.880 --> 00:04:10.600 Double-click 76 00:04:10.600 --> 00:04:13.200 When you double-click 77 00:04:13.200 --> 00:04:15.919 a blueprint editor window will appear like this 78 00:04:15.919 --> 00:04:21.440 I aligned this editor window next to the level like this 79 00:04:21.440 --> 00:04:24.839 To see the whole thing 80 00:04:24.839 --> 00:04:28.200 If you look, there's an open space in the middle 81 00:04:28.200 --> 00:04:30.600 and on the left are Components and My Blueprint 82 00:04:30.600 --> 00:04:33.920 and on the right is the Details window 83 00:04:33.920 --> 00:04:37.270 The Components on the left 84 00:04:37.270 --> 00:04:39.480 are a panel where you can load function 85 00:04:39.480 --> 00:04:41.440 blocks provided by Unreal 86 00:04:41.440 --> 00:04:44.540 For example, My Blueprint is where 87 00:04:44.540 --> 00:04:47.679 we will learn about variables later 88 00:04:47.679 --> 00:04:50.320 And the Details on the right are familiar 89 00:04:50.320 --> 00:04:51.870 You can think of it 90 00:04:51.870 --> 00:04:55.279 as a panel for setting settings 91 00:04:55.279 --> 00:04:58.079 The viewport is the same as a general viewport 92 00:04:58.079 --> 00:05:01.579 You can think of it as a space to check the visual representation 93 00:05:01.579 --> 00:05:04.720 and appearance of the blueprint 94 00:05:04.720 --> 00:05:08.480 If you look at the work that we will be working on 95 00:05:08.480 --> 00:05:12.030 if you click on the panel called Event Graph 96 00:05:12.030 --> 00:05:16.640 next to the viewport at the top 97 00:05:16.640 --> 00:05:18.600 you can see that the screen changes 98 00:05:18.600 --> 00:05:21.160 You can create it here 99 00:05:21.160 --> 00:05:23.640 There are three basic nodes 100 00:05:23.640 --> 00:05:25.799 which I will explain later 101 00:05:25.799 --> 00:05:28.119 If you right-click the blank space on the right 102 00:05:28.119 --> 00:05:31.160 there's a search window 103 00:05:31.160 --> 00:05:32.559 There's a list here, too 104 00:05:32.559 --> 00:05:33.640 You can choose from here 105 00:05:33.640 --> 00:05:36.320 but we'll search directly 106 00:05:36.320 --> 00:05:38.040 Let's search for "print" 107 00:05:38.040 --> 00:05:41.090 Then, we can pull out a node 108 00:05:41.090 --> 00:05:43.040 called "Print String" 109 00:05:43.040 --> 00:05:45.920 Let's click on it 110 00:05:45.920 --> 00:05:50.160 Then, we pulled out a node called "Print String" 111 00:05:50.160 --> 00:05:53.610 You can think of a Print String 112 00:05:53.610 --> 00:05:56.799 as a block that prints out a specific phrase 113 00:05:56.799 --> 00:05:59.160 So, it's in charge of printing out 114 00:05:59.160 --> 00:06:02.037 the content inside 115 00:06:02.037 --> 00:06:04.440 the square box in In String 116 00:06:04.440 --> 00:06:06.040 Of course, we will do "Hello World," 117 00:06:06.040 --> 00:06:13.480 so we will write "Hello World" here 118 00:06:13.480 --> 00:06:15.679 It doesn't end here 119 00:06:15.679 --> 00:06:18.440 Now, where do we connect this node? 120 00:06:18.440 --> 00:06:22.320 There's a red node called Event BeginPlay 121 00:06:22.320 --> 00:06:25.839 It's the node that first appears 122 00:06:25.839 --> 00:06:29.200 when we first create the blueprint 123 00:06:29.200 --> 00:06:32.600 This node is called an event node 124 00:06:32.600 --> 00:06:36.880 and you can think of it as a node that is told to run in a specific situation 125 00:06:36.880 --> 00:06:38.920 In this case, it's BeginPlay 126 00:06:38.920 --> 00:06:42.200 BeginPlay is a node 127 00:06:42.200 --> 00:06:45.200 that generates an event 128 00:06:45.200 --> 00:06:48.320 that runs when you first start playing 129 00:06:48.320 --> 00:06:51.079 I think it would be good to think of it this way 130 00:06:51.079 --> 00:06:55.760 Here, you can see a mark that looks like an arrow 131 00:06:55.760 --> 00:06:58.239 This is called a run pin 132 00:06:58.239 --> 00:07:02.040 If you click and drag this run pin to the side 133 00:07:02.040 --> 00:07:05.420 a line will appear 134 00:07:05.420 --> 00:07:08.040 If you connect this again 135 00:07:08.040 --> 00:07:11.480 and connect it to the run pin in the Print String 136 00:07:11.480 --> 00:07:18.000 the line will be connected like this 137 00:07:18.000 --> 00:07:19.559 If the connection is incorrect and you want to cancel it 138 00:07:19.559 --> 00:07:23.760 hold down the Alt key on your keyboard and click on the line to disconnect it 139 00:07:23.760 --> 00:07:25.119 The line will disappear 140 00:07:25.119 --> 00:07:29.040 Let's drag and drop the run pin again 141 00:07:29.040 --> 00:07:32.279 and connect it to the Print String like this 142 00:07:32.279 --> 00:07:36.279 Then, we're done 143 00:07:36.279 --> 00:07:40.160 This node can be held like this and moved back and forth 144 00:07:40.160 --> 00:07:43.040 You can also hold it and move it back and forth 145 00:07:43.040 --> 00:07:46.279 Then, you can hold it like this and move it back and forth at the same time 146 00:07:46.279 --> 00:07:51.200 You can zoom in and out using the mouse wheel button 147 00:07:51.200 --> 00:07:53.600 If you zoom in, it will go up to here 148 00:07:53.600 --> 00:07:57.839 and if you hold down the Ctrl key, you can zoom in even more 149 00:07:57.839 --> 00:07:59.480 You can do it like this 150 00:07:59.480 --> 00:08:02.959 Then, if you right-click and move the mouse back and forth 151 00:08:02.959 --> 00:08:04.839 it's called pan movement 152 00:08:04.839 --> 00:08:10.399 You can move the location like this 153 00:08:10.399 --> 00:08:12.040 And then you're done 154 00:08:12.040 --> 00:08:13.959 When you're done here 155 00:08:13.959 --> 00:08:16.679 you need to click on the button 156 00:08:16.679 --> 00:08:20.000 with the question mark that says Compile on the top left 157 00:08:20.000 --> 00:08:21.760 Compile is 158 00:08:21.760 --> 00:08:24.359 converting languages ​​people can understand 159 00:08:24.359 --> 00:08:27.920 into languages ​​that a computer can understand 160 00:08:27.920 --> 00:08:31.839 It's this kind of a proceed 161 00:08:31.839 --> 00:08:34.960 So when we do these tasks 162 00:08:34.960 --> 00:08:37.960 we need to click on this Compile button 163 00:08:37.960 --> 00:08:41.280 And when we do a task 164 00:08:41.280 --> 00:08:44.640 if you look at the top, you'll see 165 00:08:44.640 --> 00:08:48.200 an * next to the name 166 00:08:48.200 --> 00:08:53.000 And if you look at the assets 167 00:08:53.000 --> 00:08:54.840 you can see that after doing some work 168 00:08:54.840 --> 00:08:58.280 there is a * mark in the middle 169 00:08:58.280 --> 00:09:01.039 What this * mark means is that 170 00:09:01.039 --> 00:09:06.000 the work was done but not saved 171 00:09:06.000 --> 00:09:07.760 It's like when we work on a Word 172 00:09:07.760 --> 00:09:10.719 or PPT document 173 00:09:10.719 --> 00:09:14.359 and write but don't save it 174 00:09:14.359 --> 00:09:16.960 In the case of Blueprint, you can see that 175 00:09:16.960 --> 00:09:18.960 it works stably only if 176 00:09:18.960 --> 00:09:22.599 you save after Compile 177 00:09:22.599 --> 00:09:24.799 So, I recommend you develop the habit of 178 00:09:24.799 --> 00:09:26.520 always clicking the Compile 179 00:09:26.520 --> 00:09:31.520 and Save button 180 00:09:31.520 --> 00:09:33.559 So, I'll click the Compile button 181 00:09:33.559 --> 00:09:37.760 And then, I'll click the Save button 182 00:09:37.760 --> 00:09:39.520 Now, the * mark is gone 183 00:09:39.520 --> 00:09:42.599 You can also see that the * mark is gone in the Content Drawer 184 00:09:42.599 --> 00:09:46.119 We've created a simple Hello World function 185 00:09:46.119 --> 00:09:49.320 so let's check if it works 186 00:09:49.320 --> 00:09:53.280 The name Untitled hasn't been applied yet 187 00:09:53.280 --> 00:09:55.919 Let's go back to the level 188 00:09:55.919 --> 00:10:00.080 When we go back to the level, we need to open the Content Drawer 189 00:10:00.080 --> 00:10:03.280 that we created and place this blueprint that we created 190 00:10:03.280 --> 00:10:08.440 So we're going to do this by dragging and dropping 191 00:10:08.440 --> 00:10:12.239 I have always habitually placed all assets 192 00:10:12.239 --> 00:10:15.280 at the origin level 193 00:10:15.280 --> 00:10:16.320 So, let's put it at the origin 194 00:10:16.320 --> 00:10:19.359 and play it from this state 195 00:10:19.359 --> 00:10:22.080 When you press the play button at the top 196 00:10:22.080 --> 00:10:26.479 you can see Hello World briefly appear at the top of the viewport screen 197 00:10:26.479 --> 00:10:28.440 and then disappear 198 00:10:28.440 --> 00:10:33.559 It disappears too quickly, so let's fix it a little 199 00:10:33.559 --> 00:10:37.320 If you press the arrow below this Print String 200 00:10:37.320 --> 00:10:41.440 you can see the items that can set the Print String function 201 00:10:41.440 --> 00:10:44.159 Here, the Duration is currently 2 202 00:10:44.159 --> 00:10:46.640 This means it will be displayed for 2 seconds and then disappear 203 00:10:46.640 --> 00:10:48.159 Let's increase this a little more 204 00:10:48.159 --> 00:10:52.200 I'll set it so it will be displayed for 10 seconds and disappear 205 00:10:52.200 --> 00:10:54.159 Since we've made our changes, let's compile 206 00:10:54.159 --> 00:10:57.799 then compile at the top left 207 00:10:57.799 --> 00:11:01.200 and then save it 208 00:11:01.200 --> 00:11:04.100 Let's go back to the level 209 00:11:04.100 --> 00:11:07.719 and press play again 210 00:11:07.719 --> 00:11:09.320 How does it feel when you play it like this? 211 00:11:09.320 --> 00:11:13.400 A blue text that says Hello World 212 00:11:13.400 --> 00:11:17.520 is printed at the top left 213 00:11:17.520 --> 00:11:21.760 You can also see it disappear after 10 seconds 214 00:11:21.760 --> 00:11:24.119 Okay, that's it 215 00:11:24.119 --> 00:11:30.440 We created the function using blueprints 216 00:11:30.440 --> 00:11:34.440 Let's learn more about the nodes of 217 00:11:34.440 --> 00:11:37.359 the blueprints we created 218 00:11:37.359 --> 00:11:41.640 Here's a simple, frequently used node 219 00:11:41.640 --> 00:11:45.479 This node is called Set Actor Rotation 220 00:11:45.479 --> 00:11:49.440 and it's a node that sets the rotation of an actor 221 00:11:49.440 --> 00:11:52.440 So, if you look at the top, you can see the name of this node 222 00:11:52.440 --> 00:11:55.320 You can roughly tell what function this data has 223 00:11:55.320 --> 00:11:58.520 from the name 224 00:11:58.520 --> 00:12:03.640 And there's a white pin on top 225 00:12:03.640 --> 00:12:06.760 I mentioned that this pin is an execution pin 226 00:12:06.760 --> 00:12:10.239 When it receives a command to execute 227 00:12:10.239 --> 00:12:14.359 this function operates through this node 228 00:12:14.359 --> 00:12:18.559 When the operation is finished, through the execution pin behind it 229 00:12:18.559 --> 00:12:22.760 the next task is executed 230 00:12:22.760 --> 00:12:28.000 You can think of it as a pin that connects 231 00:12:28.000 --> 00:12:31.039 the execution flow by receiving an execution command 232 00:12:31.039 --> 00:12:33.039 and executing a command to execute 233 00:12:33.039 --> 00:12:36.400 And there are pins like this at the bottom 234 00:12:36.400 --> 00:12:40.640 All of these pins are called data pins 235 00:12:40.640 --> 00:12:43.640 The one on the left is an input pin 236 00:12:43.640 --> 00:12:48.080 So when executing a function in this node 237 00:12:48.080 --> 00:12:50.599 the data to be input 238 00:12:50.599 --> 00:12:54.359 is input through this pin on the left 239 00:12:54.359 --> 00:12:59.640 The data completed and calculated through this node 240 00:12:59.640 --> 00:13:05.719 is extracted through this pin on the right 241 00:13:05.719 --> 00:13:07.840 So, the flow of this blueprint 242 00:13:07.840 --> 00:13:12.440 is the flow of this data from left to right 243 00:13:12.440 --> 00:13:13.919 As you can see 244 00:13:13.919 --> 00:13:17.679 we start from the left and go to the right 245 00:13:17.679 --> 00:13:20.599 This node, Event BeginPlay 246 00:13:20.599 --> 00:13:24.400 is where an event occurs when it first starts 247 00:13:24.400 --> 00:13:29.159 We connected it so that the following Print String 248 00:13:29.159 --> 00:13:32.080 is executed when the event occurs 249 00:13:32.080 --> 00:13:36.400 But in this Print String, we didn't receive any data 250 00:13:36.400 --> 00:13:39.559 Even though there was a left pin, we didn't receive any data 251 00:13:39.559 --> 00:13:42.459 but we input our data called Hello World 252 00:13:42.459 --> 00:13:45.599 and made it run 253 00:13:45.599 --> 00:13:48.200 In the case of this print 254 00:13:48.200 --> 00:13:53.760 since the data will not fall through to the next node 255 00:13:53.760 --> 00:13:55.610 there may not be an out pin 256 00:13:55.610 --> 00:14:00.719 or an output pin that goes out 257 00:14:00.719 --> 00:14:02.679 Instead, if you tell it to do something 258 00:14:02.679 --> 00:14:04.760 next or another function 259 00:14:04.760 --> 00:14:07.000 you can connect the execution pin like this 260 00:14:07.000 --> 00:14:10.359 to do the next function 261 00:14:10.359 --> 00:14:12.799 If you connect it like this, you can think of it as 262 00:14:12.799 --> 00:14:15.599 doing a Print String 263 00:14:15.599 --> 00:14:16.954 and then running Set Actor Rotation 264 00:14:17.356 --> 00:14:20.999 Data Type and Blueprint Arithmetic Operations 265 00:14:21.320 --> 00:14:26.799 Then, let's input some data into this pin 266 00:14:26.799 --> 00:14:30.719 We're going to create a data called a variable and input it 267 00:14:30.719 --> 00:14:32.679 A variable is 268 00:14:32.679 --> 00:14:35.559 like a regular bowl 269 00:14:35.559 --> 00:14:40.119 When we eat rice, we put rice in a bowl, right? 270 00:14:40.119 --> 00:14:42.569 When we put soil 271 00:14:42.569 --> 00:14:45.359 we put it in a bowl called a flower pot 272 00:14:45.359 --> 00:14:47.640 We wouldn't put rice in a flower pot to eat 273 00:14:47.640 --> 00:14:49.119 Right? 274 00:14:49.119 --> 00:14:51.719 We process much data in programming 275 00:14:51.719 --> 00:14:55.119 such as input ​​and output values 276 00:14:55.119 --> 00:14:57.019 Each of those pieces of data 277 00:14:57.019 --> 00:15:00.691 is stored in a bowl that can hold them 278 00:15:00.691 --> 00:15:03.840 These bowls are called variables 279 00:15:03.840 --> 00:15:07.190 Just like a typical container 280 00:15:07.190 --> 00:15:10.360 variables cannot store all data 281 00:15:10.360 --> 00:15:12.910 Whenever you create a variable 282 00:15:12.910 --> 00:15:15.600 you determine the type of data it can store 283 00:15:15.600 --> 00:15:19.100 and this purpose specification is called 284 00:15:19.100 --> 00:15:23.000 a data type 285 00:15:23.000 --> 00:15:27.320 So, how many data types are there? 286 00:15:27.320 --> 00:15:30.270 There are two types of data types 287 00:15:30.270 --> 00:15:33.799 basic data types that are determined in advance 288 00:15:33.799 --> 00:15:38.349 when creating a programming language 289 00:15:38.349 --> 00:15:40.619 and user-defined data types that are created to store classes 290 00:15:40.619 --> 00:15:45.777 created by developers according to the development situation 291 00:15:45.777 --> 00:15:49.240 Class data types and user-defined data types 292 00:15:49.240 --> 00:15:51.940 are produced according to the developer's development situation 293 00:15:51.940 --> 00:15:53.320 so there is no limit to the number 294 00:15:53.320 --> 00:15:55.959 So, let's leave them out 295 00:15:55.959 --> 00:15:59.659 Even if you only consider these basic data types 296 00:15:59.659 --> 00:16:02.040 there are dozens 297 00:16:02.040 --> 00:16:04.959 so it's impossible to memorize them all 298 00:16:04.959 --> 00:16:07.809 So, let's practice creating a variable node 299 00:16:07.809 --> 00:16:10.199 based on the four most 300 00:16:10.199 --> 00:16:14.720 frequently used data types 301 00:16:14.720 --> 00:16:18.120 In addition, we'll look at nodes 302 00:16:18.120 --> 00:16:21.370 related to the functions we'll create this time 303 00:16:21.370 --> 00:16:23.839 for frequently used nodes 304 00:16:23.839 --> 00:16:26.889 Then, let's return and create 305 00:16:26.889 --> 00:16:28.480 a variable in this Print String 306 00:16:28.480 --> 00:16:32.120 and print the variable value 307 00:16:32.120 --> 00:16:35.680 The way to create a variable is at the bottom left 308 00:16:35.680 --> 00:16:39.959 There's a panel called My Blueprint at the bottom left 309 00:16:39.959 --> 00:16:44.120 If you look at it, there's an item called VARIABLES 310 00:16:44.120 --> 00:16:47.231 If you press the + button in VARIABLES 311 00:16:47.231 --> 00:16:50.440 a variable is created like this 312 00:16:50.440 --> 00:16:51.639 Here, let's create a name 313 00:16:51.639 --> 00:16:55.400 Let's create Number1 314 00:16:55.400 --> 00:16:56.199 I created a name 315 00:16:56.199 --> 00:16:58.080 This is the name of the vessel 316 00:16:58.080 --> 00:17:02.080 You can see what this vessel will be used 317 00:17:02.080 --> 00:17:05.580 for by selecting the red Boolean item 318 00:17:05.580 --> 00:17:06.800 on the right 319 00:17:06.800 --> 00:17:11.160 When you click on it, several items will appear like this 320 00:17:11.160 --> 00:17:16.559 All of these items are data types 321 00:17:16.559 --> 00:17:20.559 There are quite a lot, right? We will only try four of them 322 00:17:20.559 --> 00:17:23.240 Let's select the first one, Integer 323 00:17:23.240 --> 00:17:27.000 Click on it, and it has changed to Integer 324 00:17:27.000 --> 00:17:31.200 This setting means that vessel Number1 325 00:17:31.200 --> 00:17:35.320 is a vessel that holds data called Integer 326 00:17:35.320 --> 00:17:36.820 What is an Integer? 327 00:17:36.820 --> 00:17:40.399 An Integer refers to a general integer 328 00:17:40.399 --> 00:17:43.279 An Integer refers to an integer 329 00:17:43.279 --> 00:17:45.800 If you select this variable and go to the Details window 330 00:17:45.800 --> 00:17:48.440 you can configure various settings in the Details window 331 00:17:48.440 --> 00:17:52.940 If you look at the bottom, there’s an item called Default Value 332 00:17:52.940 --> 00:17:55.800 where you can specify a value 333 00:17:55.800 --> 00:17:59.119 You can’t enter one right now It tells you to Compile 334 00:17:59.119 --> 00:18:01.440 So, I’ll Compile it first 335 00:18:01.440 --> 00:18:05.360 It tells you to Compile and then save it after Compile 336 00:18:05.360 --> 00:18:08.910 After that, you can see 337 00:18:08.910 --> 00:18:11.800 a variable named Number1 338 00:18:11.800 --> 00:18:14.880 with the number 0 in it 339 00:18:14.880 --> 00:18:17.279 We can enter any number we want here 340 00:18:17.279 --> 00:18:21.520 Let’s try entering the number 100 341 00:18:21.520 --> 00:18:25.320 Since it’s an Integer, a variable that holds an integer 342 00:18:25.320 --> 00:18:27.000 the number 100 is entered 343 00:18:27.000 --> 00:18:28.360 Let's try inserting a decimal point here 344 00:18:28.360 --> 00:18:29.839 A decimal point is not an integer 345 00:18:29.839 --> 00:18:32.639 If it were 100.1 346 00:18:32.639 --> 00:18:38.520 the .1 at the end would be dropped 347 00:18:38.520 --> 00:18:43.279 Since it's been modified again in this state, let's Compile, save 348 00:18:43.279 --> 00:18:48.520 and connect this variable to Print String 349 00:18:48.520 --> 00:18:53.220 Let's grab the variable and drag and drop it 350 00:18:53.220 --> 00:18:54.399 into this blank space 351 00:18:54.399 --> 00:18:59.800 When you drag and drop, two options will appear 352 00:18:59.800 --> 00:19:04.960 Get Number1 will get this variable 353 00:19:04.960 --> 00:19:11.279 Set Number1 will input a specific value into this variable 354 00:19:11.279 --> 00:19:13.879 Since we're getting the value of this variable 355 00:19:13.879 --> 00:19:17.600 let's select Get Number1 356 00:19:17.600 --> 00:19:22.359 Then, a capsule-shaped node like this will be created 357 00:19:22.359 --> 00:19:24.600 You can think of this capsule as a data node 358 00:19:24.600 --> 00:19:28.519 It contains some values 359 00:19:28.519 --> 00:19:31.920 Since it contains data, there is only one data pin 360 00:19:31.920 --> 00:19:33.470 So, I will connect 361 00:19:33.470 --> 00:19:38.480 this data pin to Print String 362 00:19:38.480 --> 00:19:44.040 I will remove the data pin and connect it to this String 363 00:19:44.040 --> 00:19:50.840 When I connect it, you can see that 364 00:19:50.840 --> 00:19:53.640 an unwanted node is created in the middle 365 00:19:53.640 --> 00:19:57.880 This is called a conversion node, and the variable we created is an Integer 366 00:19:57.880 --> 00:20:01.640 which means it only contains integers, that is, integer data 367 00:20:01.640 --> 00:20:04.290 However, the Print String node 368 00:20:04.290 --> 00:20:06.040 says In String 369 00:20:06.040 --> 00:20:09.440 That means only string variables and data types 370 00:20:09.440 --> 00:20:12.160 can be inserted 371 00:20:12.160 --> 00:20:14.542 So, since the data does not match 372 00:20:14.542 --> 00:20:16.742 we need to convert the data 373 00:20:16.742 --> 00:20:19.000 to match each other 374 00:20:19.000 --> 00:20:22.000 This conversion node is what does that 375 00:20:22.000 --> 00:20:23.243 In the case of Unreal Engine 376 00:20:23.243 --> 00:20:25.480 this conversion node is automatically created 377 00:20:25.480 --> 00:20:29.679 to help you work more conveniently 378 00:20:29.679 --> 00:20:30.760 Let's take a look right away 379 00:20:30.760 --> 00:20:33.260 If you compile, save 380 00:20:33.260 --> 00:20:37.359 re-enter the level, and press the play button 381 00:20:37.359 --> 00:20:40.309 you can see the number 100 382 00:20:40.309 --> 00:20:42.519 printed in the upper left corner 383 00:20:42.519 --> 00:20:45.200 Let's create another variable 384 00:20:45.200 --> 00:20:50.880 This time, click the + button in VARIABLES 385 00:20:50.880 --> 00:20:56.720 to create a data type container called Number2 386 00:20:56.720 --> 00:21:02.770 This time, instead of Integer 387 00:21:02.770 --> 00:21:05.679 let's choose Float 388 00:21:05.679 --> 00:21:10.200 Float means a real number 389 00:21:10.200 --> 00:21:13.880 A real number is a number that includes a decimal point 390 00:21:13.880 --> 00:21:16.638 Of course, it includes integers 1, 2, 3, and 4 391 00:21:16.638 --> 00:21:18.959 but it also includes decimal points, .5, .14 392 00:21:18.959 --> 00:21:22.959 I think it would be better to say that it is a number that is 393 00:21:22.959 --> 00:21:26.259 a slightly larger range than integers that includes numbers 394 00:21:26.259 --> 00:21:26.920 after the decimal point like this 395 00:21:26.920 --> 00:21:31.519 So, Compile and save 396 00:21:31.519 --> 00:21:33.679 Let's get this Number2 variable 397 00:21:33.679 --> 00:21:37.920 Drag & Drop, Get Number2 398 00:21:37.920 --> 00:21:39.519 I'll connect it to this string 399 00:21:39.519 --> 00:21:42.959 Let's connect it like this with Drag & Drop 400 00:21:42.959 --> 00:21:45.959 Likewise, since the data type 401 00:21:45.959 --> 00:21:48.000 is different 402 00:21:48.000 --> 00:21:50.959 you can see that a conversion node was automatically created 403 00:21:50.959 --> 00:21:52.559 Oh, I didn't enter a number 404 00:21:52.559 --> 00:21:57.640 The default number, if you look at the default value of this variable 405 00:21:57.640 --> 00:21:59.790 is 0.0 406 00:21:59.790 --> 00:22:02.799 which shows that it can include a decimal point 407 00:22:02.799 --> 00:22:03.555 Let's write it like this 408 00:22:03.555 --> 00:22:06.640 Let's write it like 3.14 409 00:22:06.640 --> 00:22:08.992 If you Compile, Save 410 00:22:08.992 --> 00:22:11.880 and come back and play in this state 411 00:22:11.880 --> 00:22:16.640 you can see that 3.14 is printed like this 412 00:22:16.640 --> 00:22:19.340 When adding these functions, this player 413 00:22:19.340 --> 00:22:21.399 must be stopped 414 00:22:21.399 --> 00:22:26.839 That way, you can write the function properly 415 00:22:26.839 --> 00:22:28.920 Let's create one more variable 416 00:22:28.920 --> 00:22:31.070 Click the + button 417 00:22:31.070 --> 00:22:38.600 to create a variable called Text1 418 00:22:38.600 --> 00:22:42.359 As the name suggests, it will hold text 419 00:22:42.359 --> 00:22:46.359 As we briefly mentioned in our Print String 420 00:22:46.359 --> 00:22:50.920 text is stored using this String data type 421 00:22:50.920 --> 00:22:55.278 Let's drag and drop to get the variable 422 00:22:55.278 --> 00:22:57.720 called Get Text1 and connect it 423 00:22:57.720 --> 00:23:01.270 If you connect it like this, there is no change node in the middle 424 00:23:01.270 --> 00:23:03.239 because it is the same string 425 00:23:03.239 --> 00:23:06.119 You can see that it is connected right away 426 00:23:06.119 --> 00:23:08.469 However, this connected line 427 00:23:08.469 --> 00:23:11.040 crosses these transformation nodes and is a bit messy 428 00:23:11.040 --> 00:23:13.640 So, let's organize this line a bit 429 00:23:13.640 --> 00:23:18.399 If you move it slightly to the side, place the mouse between these lines 430 00:23:18.399 --> 00:23:21.149 and double-click 431 00:23:21.149 --> 00:23:24.200 then, a new point will appear 432 00:23:24.200 --> 00:23:26.279 A new pin will be created 433 00:23:26.279 --> 00:23:28.559 You can grab this pin and move it 434 00:23:28.559 --> 00:23:32.919 If you move it like this, you can organize it without it being too complicated 435 00:23:32.919 --> 00:23:37.159 We haven't set a value for this Text yet 436 00:23:37.159 --> 00:23:40.409 So Compile, save 437 00:23:40.409 --> 00:23:44.989 and Unreal Engine, shall we say? 438 00:23:44.989 --> 00:23:50.280 You can also input Korean in this string 439 00:23:50.280 --> 00:23:52.580 If you Compile in this state 440 00:23:52.580 --> 00:23:54.599 save 441 00:23:54.599 --> 00:23:57.999 and play again 442 00:23:57.999 --> 00:24:00.349 you can see that the phrase 443 00:24:00.349 --> 00:24:03.599 Unreal Engine is printed like this 444 00:24:03.599 --> 00:24:11.520 This time, we have a logical data type determining true or false 445 00:24:11.520 --> 00:24:14.520 Is it a person? Is it not a person? Things like that 446 00:24:14.520 --> 00:24:18.119 Are you playing? Are you not playing? 447 00:24:18.119 --> 00:24:21.769 Some variables contain information values ​​that tell you 448 00:24:21.769 --> 00:24:25.239 true or false, such as whether it is or is not 449 00:24:25.239 --> 00:24:28.440 It is a logical data type 450 00:24:28.440 --> 00:24:35.239 so I will name it isMan 451 00:24:35.239 --> 00:24:39.400 This logical data type is the Boolean above 452 00:24:39.400 --> 00:24:42.840 When we first created the variable, we briefly looked at Boolean 453 00:24:42.840 --> 00:24:45.090 This Boolean variable contains the true or false variable 454 00:24:45.090 --> 00:24:50.239 I discussed earlier 455 00:24:50.239 --> 00:24:52.639 So regardless of the content 456 00:24:52.639 --> 00:24:54.599 whether this is a person or not 457 00:24:54.599 --> 00:24:56.144 playing or not 458 00:24:56.144 --> 00:24:57.760 it only stores information about 459 00:24:57.760 --> 00:25:02.039 whether it is right or wrong 460 00:25:02.039 --> 00:25:05.880 If you compile and look at the classification value 461 00:25:05.880 --> 00:25:07.559 you will find a variable named isMan 462 00:25:07.559 --> 00:25:10.760 On the right, you can see a check box like this 463 00:25:10.760 --> 00:25:16.000 So if it is disabled, it means False 464 00:25:16.000 --> 00:25:22.440 If it is checked, True is saved 465 00:25:22.440 --> 00:25:24.140 So, since 466 00:25:24.140 --> 00:25:25.880 it is checked now 467 00:25:25.880 --> 00:25:29.640 True is saved in the variable 468 00:25:29.640 --> 00:25:35.640 Let's do this by bringing this variable 469 00:25:35.640 --> 00:25:37.479 and connecting it 470 00:25:37.479 --> 00:25:43.599 Since it is a Bool value, a conversion node will come out like this 471 00:25:43.599 --> 00:25:46.719 If you compile, save, and play in this state 472 00:25:46.719 --> 00:25:50.520 you can see that the True value is output like this 473 00:25:50.520 --> 00:25:52.080 Earlier, we checked 474 00:25:52.080 --> 00:25:56.840 Check means True 475 00:25:56.840 --> 00:26:00.840 On the other hand, if we uncheck 476 00:26:00.840 --> 00:26:03.799 the value of this variable and make it False 477 00:26:03.799 --> 00:26:07.080 then when we compile, save, and play 478 00:26:07.080 --> 00:26:11.599 the output will be False 479 00:26:11.599 --> 00:26:14.280 We learned about four variables 480 00:26:14.280 --> 00:26:16.830 If we only know these four variables 481 00:26:16.830 --> 00:26:20.280 we can do many things 482 00:26:20.280 --> 00:26:24.679 This time, by utilizing these variables 483 00:26:24.679 --> 00:26:26.330 we will learn about 484 00:26:26.330 --> 00:26:29.119 control statements that can create functions 485 00:26:29.119 --> 00:26:32.236 Control means using 486 00:26:32.236 --> 00:26:34.159 these variables 487 00:26:34.159 --> 00:26:36.559 So let's start with 488 00:26:36.559 --> 00:26:39.960 the simplest arithmetic operations 489 00:26:39.960 --> 00:26:43.039 Since these variables were created for the introduction 490 00:26:43.039 --> 00:26:48.280 let’s start by creating a new variable 491 00:26:48.280 --> 00:26:49.719 First, click the + button 492 00:26:49.719 --> 00:26:52.159 and this time, Number was used first 493 00:26:52.159 --> 00:26:56.280 Let’s create a new name, Num, with the number 01 494 00:26:56.280 --> 00:27:00.980 and the data type is Integer 495 00:27:00.980 --> 00:27:02.520 Since integers are a little easier to improve 496 00:27:02.520 --> 00:27:05.159 let’s create an Integer 497 00:27:05.159 --> 00:27:08.709 Click Compile 498 00:27:08.709 --> 00:27:11.840 and enter the number 100 in this number 499 00:27:11.840 --> 00:27:13.599 Then, let’s create one more variable 500 00:27:13.599 --> 00:27:19.771 Click VARIABLES and name it Num02 501 00:27:19.771 --> 00:27:24.760 Again, let’s make it an Integer 502 00:27:24.760 --> 00:27:27.280 Again, click the Compile button 503 00:27:27.280 --> 00:27:32.719 and put 50 in this variable 504 00:27:32.719 --> 00:27:35.599 If we do addition during the four basic operations, it will be 150 505 00:27:35.599 --> 00:27:39.840 To make it easier 506 00:27:39.840 --> 00:27:45.280 let’s bring in these two variables 507 00:27:45.280 --> 00:27:50.080 Let's get Get Number1, Get Number2 508 00:27:50.080 --> 00:27:53.960 by drag and drop 509 00:27:53.960 --> 00:27:57.039 I'm going to add these two numbers 510 00:27:57.039 --> 00:28:01.789 To add them, right-click on a space 511 00:28:01.789 --> 00:28:04.440 and search for add 512 00:28:04.440 --> 00:28:05.990 There's a node called Add 513 00:28:05.990 --> 00:28:08.280 among the Operators 514 00:28:08.280 --> 00:28:11.039 If you select Add, there's a node like this 515 00:28:11.039 --> 00:28:15.000 You can think of this node as a node 516 00:28:15.000 --> 00:28:17.600 that adds the input pins on the left 517 00:28:17.600 --> 00:28:19.880 and outputs the result of the addition 518 00:28:19.880 --> 00:28:23.372 So, input Num01, Num02 on the top left 519 00:28:23.372 --> 00:28:26.679 and Num02 on the botton 520 00:28:26.679 --> 00:28:28.879 And if we connect this result 521 00:28:28.879 --> 00:28:31.320 back to Print String like this 522 00:28:31.320 --> 00:28:36.479 we can see that it is connected 523 00:28:36.479 --> 00:28:39.960 to Print String through conversion like this 524 00:28:39.960 --> 00:28:42.359 Let's compile and check 525 00:28:42.359 --> 00:28:44.609 Since we did addition, since it's 100+50 526 00:28:44.609 --> 00:28:46.679 150 will be output 527 00:28:46.679 --> 00:28:50.320 Let's see, let's play 528 00:28:50.320 --> 00:28:54.320 How is it? 150 is output 529 00:28:54.320 --> 00:28:57.039 We did addition, simple, right? 530 00:28:57.039 --> 00:28:59.828 In addition to this, the addition node 531 00:28:59.828 --> 00:29:01.479 becomes an addition when you add 532 00:29:01.479 --> 00:29:03.559 It's the same 533 00:29:03.559 --> 00:29:05.719 Minus, in English, it's subtract 534 00:29:05.719 --> 00:29:08.119 If you search for subtract 535 00:29:08.119 --> 00:29:10.799 the usage of the minus node is the same 536 00:29:10.799 --> 00:29:14.599 You can connect the minus node and output it 537 00:29:14.599 --> 00:29:16.039 and multiplication is the same 538 00:29:16.039 --> 00:29:21.159 If you search for Multiply 539 00:29:21.159 --> 00:29:24.880 you can also take out the Multiply multiplication node and use it 540 00:29:24.880 --> 00:29:27.239 The method is the same 541 00:29:27.239 --> 00:29:28.599 Division is the same 542 00:29:28.599 --> 00:29:31.679 If you right-click and search for divide 543 00:29:31.679 --> 00:29:34.440 a division node is created like this 544 00:29:34.440 --> 00:29:40.320 In the same way, you can connect the results of dividing two variables 545 00:29:40.320 --> 00:29:42.599 and see the final result 546 00:29:42.599 --> 00:29:46.400 Here, the important thing is that if you want to create an addition node 547 00:29:46.400 --> 00:29:47.880 and see the result 548 00:29:47.880 --> 00:29:50.320 in a case like this, you come in 549 00:29:50.320 --> 00:29:58.722 and put the number 50 in this variable at 102 550 00:29:58.722 --> 00:30:00.841 and Compile, save 551 00:30:00.841 --> 00:30:05.180 and play is a bit complicated 552 00:30:05.180 --> 00:30:08.780 I just want to set it up right at this level 553 00:30:08.780 --> 00:30:10.940 and see the result right away 554 00:30:10.940 --> 00:30:14.390 but it would be quite a hassle 555 00:30:14.390 --> 00:30:17.125 to go into the blueprint 556 00:30:17.125 --> 00:30:20.420 set it up, compile, and go back and forth 557 00:30:20.420 --> 00:30:25.370 So, we provide a function 558 00:30:25.370 --> 00:30:28.420 to expose this node to the outside 559 00:30:28.420 --> 00:30:31.601 As you can see 560 00:30:31.601 --> 00:30:32.951 we are using 561 00:30:32.951 --> 00:30:36.240 the Num01 and Num02 variables for addition 562 00:30:36.240 --> 00:30:40.759 If you look on the right, there is an eye-closed icon 563 00:30:40.759 --> 00:30:42.693 If you click this icon 564 00:30:42.693 --> 00:30:48.232 it will change to an eye-open icon like this 565 00:30:48.232 --> 00:30:50.132 Here's what happens 566 00:30:50.132 --> 00:30:53.219 Compile and save it 567 00:30:53.219 --> 00:30:55.119 If you select this actor 568 00:30:55.119 --> 00:30:59.060 called BP_Basic that we uploaded 569 00:30:59.060 --> 00:31:01.410 and look at the Details window 570 00:31:01.410 --> 00:31:03.540 you can see that 571 00:31:03.540 --> 00:31:05.890 there's a variable called Num01 572 00:31:05.890 --> 00:31:08.059 exposed in the item called Default 573 00:31:08.059 --> 00:31:10.259 You can also see that the value 574 00:31:10.259 --> 00:31:14.081 is 100 575 00:31:14.081 --> 00:31:18.190 Simple, right? Then, I'll expose the second one 576 00:31:18.190 --> 00:31:24.480 If you click this button, or this button, in the Details window 577 00:31:24.480 --> 00:31:26.580 select this variable 578 00:31:26.580 --> 00:31:29.120 and then look at the Details window of this blueprint window 579 00:31:29.120 --> 00:31:32.360 there will be an item called Instance Editable 580 00:31:32.360 --> 00:31:35.760 You can see that it's checked 581 00:31:35.760 --> 00:31:41.720 If you close your eyes, you can see that it's unchecked 582 00:31:41.720 --> 00:31:43.789 Conversely, if you check here 583 00:31:43.789 --> 00:31:46.000 you can see that your eyes are open 584 00:31:46.000 --> 00:31:50.699 You can think of this item here as an item 585 00:31:50.699 --> 00:31:53.260 that can be exposed to the outside. 586 00:31:53.260 --> 00:31:55.500 So, if you compile and save it 587 00:31:55.500 --> 00:31:59.300 now that we have selected the actor we uploaded 588 00:31:59.300 --> 00:32:01.750 you can see the values ​​of two variables 589 00:32:01.750 --> 00:32:04.379 in the Details window 590 00:32:04.379 --> 00:32:06.139 Let's change it 591 00:32:06.139 --> 00:32:08.979 Let's say this is 300 592 00:32:08.979 --> 00:32:10.300 How much will it be? 593 00:32:10.300 --> 00:32:13.217 Since it's a plus node now, it'll be 400 594 00:32:13.217 --> 00:32:16.767 If you play, you can see that the number 400 595 00:32:16.767 --> 00:32:18.199 is printed 596 00:32:18.199 --> 00:32:20.399 Easy 597 00:32:20.399 --> 00:32:23.119 We used variables to perform arithmetic operations 598 00:32:23.119 --> 00:32:27.240 This time, we'll learn about conditional statements 599 00:32:27.240 --> 00:32:31.119 A conditional statement is a structure that says "if ~~, then ~~" 600 00:32:31.119 --> 00:32:35.360 In most programming, rather than executing unconditionally 601 00:32:35.360 --> 00:32:37.160 like arithmetic operations 602 00:32:37.160 --> 00:32:40.104 it's much more common to execute 603 00:32:40.104 --> 00:32:42.110 only when a specific condition is met 604 00:32:42.110 --> 00:32:45.500 For example, instead of just saying the door opened 605 00:32:45.500 --> 00:32:48.660 say the door opened when the button was pressed 606 00:32:48.660 --> 00:32:51.779 Or instead of unconditionally creating an enemy 607 00:32:51.779 --> 00:32:54.339 say that an enemy is created after 2 seconds 608 00:32:54.339 --> 00:32:56.699 That's what this means 609 00:32:56.699 --> 00:33:00.580 So, let's make a simple conditional statement example 610 00:33:00.580 --> 00:33:02.779 and go through it 611 00:33:02.779 --> 00:33:04.779 We will compare 612 00:33:04.779 --> 00:33:09.820 the variables Num01 and Num02 613 00:33:09.820 --> 00:33:13.120 and if the number Num01 614 00:33:13.120 --> 00:33:16.800 is much larger than Num02 615 00:33:16.800 --> 00:33:20.279 print the message "Num01 is larger" 616 00:33:20.279 --> 00:33:24.600 Otherwise, if Num02 is larger 617 00:33:24.600 --> 00:33:27.479 If Num02 is bigger 618 00:33:27.479 --> 00:33:31.240 If Num01 is not larger than Num02 619 00:33:31.240 --> 00:33:34.440 print "2 is larger" 620 00:33:34.440 --> 00:33:38.611 I'll put this condition 621 00:33:38.611 --> 00:33:41.229 To do that, let's first 622 00:33:41.229 --> 00:33:43.820 erase the plus in front 623 00:33:43.820 --> 00:33:46.139 Since we're comparing these two variables 624 00:33:46.139 --> 00:33:51.020 and outputting different outputs depending on the result 625 00:33:51.020 --> 00:33:54.100 we need to compare them anyway 626 00:33:54.100 --> 00:33:57.339 We need to compare these two variables 627 00:33:57.339 --> 00:34:02.100 So, I will take out a node that compares two variables 628 00:34:02.100 --> 00:34:06.940 Right-click We probably learned in math class 629 00:34:06.940 --> 00:34:10.000 Comparing, greater than something 630 00:34:10.000 --> 00:34:13.320 Or less than something, expressed with brackets 631 00:34:13.320 --> 00:34:16.225 If you press brackets on your keyboard like this 632 00:34:16.225 --> 00:34:20.160 you can take out a Greater node 633 00:34:20.160 --> 00:34:22.679 Like this 634 00:34:22.679 --> 00:34:25.640 So if you put Num01 in the pin above like this 635 00:34:25.640 --> 00:34:28.920 and put the variable below like this 636 00:34:28.920 --> 00:34:33.920 a node that says is Num01 637 00:34:33.920 --> 00:34:37.700 greater than Num02 is created 638 00:34:37.700 --> 00:34:40.619 This is called a comparison operator 639 00:34:40.619 --> 00:34:43.260 So there are "big" 640 00:34:43.260 --> 00:34:46.459 and "small," just like we learn in math class 641 00:34:46.459 --> 00:34:47.619 There is "less" 642 00:34:47.619 --> 00:34:49.540 There is "small" like this 643 00:34:49.540 --> 00:34:52.059 and then there is Greater Equal 644 00:34:52.059 --> 00:34:55.820 There are also things like Greater Equal 645 00:34:55.820 --> 00:34:57.981 There will also be things like Smaller Equal 646 00:34:57.981 --> 00:34:59.559 And there will also be things like this 647 00:34:59.559 --> 00:35:01.079 There will also be "equal to" 648 00:35:01.079 --> 00:35:05.720 We generally express "equal to" as = 649 00:35:05.720 --> 00:35:09.160 but generally in coding, = is an assignment operator 650 00:35:09.160 --> 00:35:11.040 that is used to input a value 651 00:35:11.040 --> 00:35:14.959 So in coding, to express "equal to," 652 00:35:14.959 --> 00:35:16.839 we express it as == 653 00:35:16.839 --> 00:35:18.920 That is why the node called "Equal" comes out like this 654 00:35:18.920 --> 00:35:21.920 == comes out 655 00:35:21.920 --> 00:35:27.160 If there is "equal to", there must also be "not equal to" 656 00:35:27.160 --> 00:35:31.380 In code, we put an exclamation mark in front 657 00:35:31.380 --> 00:35:35.500 If we write "!=" 658 00:35:35.500 --> 00:35:40.359 this means "Not Equal" 659 00:35:40.359 --> 00:35:45.500 In this way, we can compare two pieces of information 660 00:35:45.500 --> 00:35:48.420 We want the variable in front 661 00:35:48.420 --> 00:35:52.820 the Num01 variable, to be greater than the Num02 variable 662 00:35:52.820 --> 00:35:55.940 So, we used the Greater node 663 00:35:55.940 --> 00:35:58.760 Now, we've compared the two variables 664 00:35:58.760 --> 00:36:00.480 So what we need to do now is 665 00:36:00.480 --> 00:36:02.880 depending on the result values ​​of these two variables 666 00:36:02.880 --> 00:36:06.760 if the Num01 variable is greater, we need to output "Num01 is greater" 667 00:36:06.760 --> 00:36:09.610 and if Num02 is greater, we need to output 668 00:36:09.610 --> 00:36:11.600 "Num02 is greater" 669 00:36:11.600 --> 00:36:13.000 We have to do that 670 00:36:13.000 --> 00:36:15.650 So, since the result value 671 00:36:15.650 --> 00:36:17.200 from this comparison operator 672 00:36:17.200 --> 00:36:19.760 is divided into two branches 673 00:36:19.760 --> 00:36:22.579 we need another node 674 00:36:22.579 --> 00:36:25.420 The node we need at this time 675 00:36:25.420 --> 00:36:31.179 is called Branch 676 00:36:31.179 --> 00:36:32.980 So, we take out the Branch node 677 00:36:32.980 --> 00:36:36.779 This Branch node is executed in BeginPlay 678 00:36:36.779 --> 00:36:40.579 and connected directly to the Branch 679 00:36:40.579 --> 00:36:42.621 First, check what? 680 00:36:42.621 --> 00:36:49.420 The result of comparing Num01 and Num02 is checked like this 681 00:36:49.420 --> 00:36:52.170 and the result value is connected to the condition like this 682 00:36:52.170 --> 00:36:55.640 When this result is true 683 00:36:55.640 --> 00:36:57.200 what does it mean that it is true? 684 00:36:57.200 --> 00:37:00.679 Num01 is greater than Num02 685 00:37:00.679 --> 00:37:03.040 Oh, that's right, it's true 686 00:37:03.040 --> 00:37:10.079 If you say that Num01 is greater, it goes to True 687 00:37:10.079 --> 00:37:15.119 If you say that Num01 is not greater, it's False 688 00:37:15.119 --> 00:37:16.519 You can think of it 689 00:37:16.519 --> 00:37:18.519 as taking a branch that goes to False 690 00:37:18.519 --> 00:37:20.480 Then, this is what you should do 691 00:37:20.480 --> 00:37:22.930 If it's True 692 00:37:22.930 --> 00:37:25.059 If you say that Num01 and Num02 are compared 693 00:37:25.059 --> 00:37:28.380 and Num01 is greater 694 00:37:28.380 --> 00:37:31.270 connect this True to the Print String 695 00:37:31.270 --> 00:37:33.179 What you print at this time is that 696 00:37:33.179 --> 00:37:40.779 Num01 is greater 697 00:37:40.779 --> 00:37:41.726 That's a typo 698 00:37:48.132 --> 00:37:52.000 When you compare the two nodes 699 00:37:52.000 --> 00:37:57.799 do you say that 2 is greater than 1? No, 2 is greater 700 00:37:57.799 --> 00:37:59.480 it should return False 701 00:37:59.480 --> 00:38:03.880 In this False case, you print out that 702 00:38:03.880 --> 00:38:05.559 Num02 is greater 703 00:38:05.559 --> 00:38:07.399 so copy this node as it is 704 00:38:07.399 --> 00:38:09.949 and press Ctrl+C and Ctrl+V 705 00:38:09.949 --> 00:38:12.160 to connect it to the second node 706 00:38:12.160 --> 00:38:17.110 No, Num02 is bigger 707 00:38:17.110 --> 00:38:21.059 Connect it like this 708 00:38:21.059 --> 00:38:24.859 This is a conditional statement 709 00:38:24.859 --> 00:38:26.309 Using Branch 710 00:38:26.309 --> 00:38:29.500 if the result of the condition in front is true 711 00:38:29.500 --> 00:38:33.619 it will be connected to the True execution pin 712 00:38:33.619 --> 00:38:35.619 and executed here 713 00:38:35.619 --> 00:38:39.020 If the result is false 714 00:38:39.020 --> 00:38:41.940 it will be executed using 715 00:38:41.940 --> 00:38:45.599 the False execution pin below it 716 00:38:45.599 --> 00:38:48.559 Compile and save 717 00:38:48.559 --> 00:38:50.320 and look at the current case 718 00:38:50.320 --> 00:38:54.760 Since Num01 has 100 and Num02 has 300 719 00:38:54.760 --> 00:38:56.840 when comparing 1 and 2 720 00:38:56.840 --> 00:38:59.919 it asked, “Is Num01 greater than Num02?” 721 00:38:59.919 --> 00:39:01.919 if you look at it now, it’s not 722 00:39:01.919 --> 00:39:03.239 It’s false, right? 723 00:39:03.239 --> 00:39:05.359 Then, it will take a false line 724 00:39:05.359 --> 00:39:06.980 Since it will take a false execution pin 725 00:39:06.980 --> 00:39:10.130 No, Num02 is greater 726 00:39:10.130 --> 00:39:12.419 will probably be the output 727 00:39:12.419 --> 00:39:15.700 Let's see, let's play 728 00:39:15.700 --> 00:39:22.419 How is it? It says that Num02 is bigger 729 00:39:22.419 --> 00:39:24.020 This time, let's do the opposite 730 00:39:24.020 --> 00:39:27.900 Instead of 100, let's try 500 731 00:39:27.900 --> 00:39:29.460 Num01 is bigger, right? 732 00:39:29.460 --> 00:39:30.940 Since Num01 is bigger than Num02 733 00:39:30.940 --> 00:39:33.739 it will be true this time 734 00:39:33.739 --> 00:39:35.140 Let's play 735 00:39:35.140 --> 00:39:42.440 Then, it says that Num01 is bigger 736 00:39:42.440 --> 00:39:48.599 This structure, conditional statements, is divided into branches 737 00:39:48.599 --> 00:39:55.719 depending on whether the result of a calculation is true or false 738 00:39:55.719 --> 00:40:00.559 So, we learned about arithmetic operations 739 00:40:00.559 --> 00:40:01.880 and conditional statements 740 00:40:02.389 --> 00:40:06.033 Event Graph Execution Order 741 00:40:06.683 --> 00:40:08.320 We learned about nodes 742 00:40:08.320 --> 00:40:12.840 This time, we will learn about the red nodes 743 00:40:12.840 --> 00:40:16.159 These red nodes are called event nodes 744 00:40:16.159 --> 00:40:20.320 You probably remember 745 00:40:20.320 --> 00:40:23.599 these three nodes created 746 00:40:23.599 --> 00:40:28.320 when you first opened the Blueprint Event Graph 747 00:40:28.320 --> 00:40:32.330 These nodes are all called event nodes 748 00:40:32.330 --> 00:40:35.419 Normal nodes are called by the execution pin on the left like this 749 00:40:35.419 --> 00:40:39.140 and when it's time to execute 750 00:40:39.140 --> 00:40:42.690 they're executed like this on the right 751 00:40:42.690 --> 00:40:44.820 but these event nodes 752 00:40:44.820 --> 00:40:48.140 don't have an execution pin on the left 753 00:40:48.140 --> 00:40:54.219 and the Unreal Engine system automatically executes them 754 00:40:54.219 --> 00:40:58.361 So when do these events occur? 755 00:40:58.361 --> 00:41:01.761 If we connect it to this person 756 00:41:01.761 --> 00:41:03.359 it will be a little easier to understand 757 00:41:03.359 --> 00:41:05.080 What is this mean? 758 00:41:05.080 --> 00:41:09.679 A person is born, lives, and dies 759 00:41:09.679 --> 00:41:12.799 Usually, a life cycle is a series of processes 760 00:41:12.799 --> 00:41:17.000 in a person's life 761 00:41:17.000 --> 00:41:19.960 In a programming engine, when an object is created 762 00:41:19.960 --> 00:41:24.281 each created object calls a specific event 763 00:41:24.281 --> 00:41:27.691 according to this life cycle 764 00:41:27.691 --> 00:41:30.419 So, when an object is created 765 00:41:30.419 --> 00:41:33.619 it is like when a person is born 766 00:41:33.619 --> 00:41:37.179 The node that is called exactly once 767 00:41:37.179 --> 00:41:40.179 is the Event BeginPlay node 768 00:41:40.179 --> 00:41:44.260 So, it is called once at the beginning 769 00:41:44.260 --> 00:41:48.820 On the other hand, while the object is not destroyed and maintained 770 00:41:48.820 --> 00:41:50.913 if we compare it to a person 771 00:41:50.913 --> 00:41:53.460 it would be the entire time they are alive after birth 772 00:41:53.460 --> 00:41:56.059 While it is not destroyed like this and is maintained 773 00:41:56.059 --> 00:42:01.119 this Event Tick node is called repeatedly for each frame 774 00:42:01.119 --> 00:42:04.039 while it is alive 775 00:42:04.039 --> 00:42:06.760 It will calculate the entire code for each frame 776 00:42:06.760 --> 00:42:09.479 and continue to show a newly updated image 777 00:42:09.479 --> 00:42:11.520 for each frame 778 00:42:11.520 --> 00:42:17.479 That is why we, the user, perceive movement 779 00:42:17.479 --> 00:42:19.359 You can think of movement 780 00:42:19.359 --> 00:42:22.209 as being expressed 781 00:42:22.209 --> 00:42:25.041 through the Event Tick call 782 00:42:25.041 --> 00:42:28.419 And there is a node called Event Destroyed 783 00:42:28.419 --> 00:42:33.712 that is called right before an object like this is destroyed 784 00:42:33.712 --> 00:42:38.739 which would be equivalent to death for a person 785 00:42:38.739 --> 00:42:41.340 When we practice like this 786 00:42:41.340 --> 00:42:43.460 to make it run only once 787 00:42:43.460 --> 00:42:46.700 we connect this execution pin 788 00:42:46.700 --> 00:42:50.500 to the Event BeginPlay node and the next execution pin 789 00:42:50.500 --> 00:42:54.659 What if it's not this BeginPlay that's called first 790 00:42:54.679 --> 00:42:56.840 but the Event Tick 791 00:42:56.840 --> 00:43:00.920 it's down there? 792 00:43:00.920 --> 00:43:03.201 Let's take a closer look 793 00:43:03.201 --> 00:43:06.679 Let's break this down for a moment 794 00:43:06.679 --> 00:43:13.500 Let's briefly break this down 795 00:43:13.500 --> 00:43:16.200 and connect this phrase 796 00:43:23.123 --> 00:43:26.659 that says Event BeginPlay 797 00:43:26.659 --> 00:43:30.490 has been called to the event node 798 00:43:30.490 --> 00:43:34.140 You may remember that we ran the phrase Hello World 799 00:43:34.140 --> 00:43:35.859 once at the beginning 800 00:43:35.859 --> 00:43:38.460 If you do BeginPlay, it will be called only once 801 00:43:38.460 --> 00:43:41.202 If you compile, save, and play 802 00:43:41.202 --> 00:43:44.877 you can see it's called 803 00:43:44.877 --> 00:43:48.440 once like this 804 00:43:48.440 --> 00:43:53.200 Let's connect this to Event Tick 805 00:43:53.200 --> 00:43:56.359 What happens? 806 00:43:56.359 --> 00:44:00.080 If you compile, save, and play 807 00:44:00.080 --> 00:44:02.280 you can see that it is called on the left 808 00:44:02.280 --> 00:44:04.919 and continues to be printed 809 00:44:04.919 --> 00:44:08.431 It is continuously accumulating here 810 00:44:08.431 --> 00:44:10.500 You can see that the one at the top 811 00:44:10.500 --> 00:44:13.539 is called and calculated last 812 00:44:13.539 --> 00:44:15.820 If you look from here to here 813 00:44:15.820 --> 00:44:18.700 it is reading like this 814 00:44:18.700 --> 00:44:20.619 You can see that it is reading like this 815 00:44:20.619 --> 00:44:23.900 It reads once, then comes back and reads again 816 00:44:23.900 --> 00:44:29.780 reads again, and reads again 817 00:44:29.780 --> 00:44:33.600 and this is called Event Tick 818 00:44:33.600 --> 00:44:37.000 And if you look at this event 819 00:44:37.000 --> 00:44:39.039 Let's stop here 820 00:44:39.039 --> 00:44:41.589 There's something called 821 00:44:41.589 --> 00:44:42.559 Event ActorBeginOverlap 822 00:44:42.559 --> 00:44:46.000 and this is related to collision 823 00:44:46.000 --> 00:44:50.960 Begin, Tick, and then the collision-related event is there 824 00:44:50.960 --> 00:44:54.080 because the object is alive 825 00:44:54.080 --> 00:44:55.760 It can collide at any time 826 00:44:55.760 --> 00:44:58.100 and as it lives, it can collide somehow 827 00:44:58.100 --> 00:45:00.940 So, these three event nodes 828 00:45:00.940 --> 00:45:04.380 always come out first like this 829 00:45:04.380 --> 00:45:06.619 But as you can see, there's no Destroyed 830 00:45:06.619 --> 00:45:11.179 This is because we don't know when this object will disappear 831 00:45:11.179 --> 00:45:12.739 so that it can collide and disappear 832 00:45:12.739 --> 00:45:14.419 Still, it may 833 00:45:14.419 --> 00:45:17.179 or never disappear 834 00:45:17.179 --> 00:45:18.700 So in cases like Destroyed 835 00:45:18.700 --> 00:45:23.500 the developer is told to take it out whenever he wants 836 00:45:23.500 --> 00:45:27.490 so it doesn't come out first by default 837 00:45:27.490 --> 00:45:30.880 So, three things come out like this 838 00:45:30.880 --> 00:45:31.880 Did you get it? 839 00:45:31.880 --> 00:45:35.119 So, I think we've covered the basic theory of 840 00:45:35.119 --> 00:45:37.080 blueprints to some extent 841 00:45:37.080 --> 00:45:39.400 With this level of basic theory 842 00:45:39.400 --> 00:45:41.520 you can create most functions 843 00:45:41.520 --> 00:45:45.239 So in the next video, we'll create simple functions 844 00:45:45.239 --> 00:45:48.599 based on this theory 845 00:45:48.599 --> 00:45:51.559 So, let's summarize what we learned in this session 846 00:45:53.282 --> 00:45:54.132 Understanding Blueprints and Blueprint Scripting Blueprints Unreal's own design system designed to design complex actors Visual scripting system 847 00:45:54.132 --> 00:45:54.932 Blueprint Scripting Create a new folder in the Content folder and save it as BP Right-click on an empty space in the BP folder and select Blueprint Class 848 00:45:54.932 --> 00:45:55.682 After selecting the Actor class, set the Blueprint class name to BP_Basic Go to the Event Graph panel, right-click on an empty space, and create a Print String node 849 00:45:55.682 --> 00:45:56.482 Enter Hello World in the Print String node and connect it to the Event BeginPlay node execution pin Drag the BP_Basic blueprint class and place it in the world 850 00:45:56.482 --> 00:45:57.282 When running, check that the phrase 'Hello World' is displayed in the upper left of the viewport Node structure and flow 851 00:45:57.282 --> 00:45:58.104 Blueprint Node Configuration: Execute Pin, Input Pin, Output Pin Data flow is executed from left to right 852 00:45:58.104 --> 00:45:58.854 Data Type and Blueprint Arithmetic Operations Variables A container that can hold each piece of data Data Type: The type of data that a variable can have 853 00:45:58.854 --> 00:45:59.754 Basic data type: Data type determined when creating a programming language User-defined data type: Data type created according to the development situation 854 00:45:59.754 --> 00:46:00.604 The most commonly used primitive data types: Float, Integer, String, Boolean 855 00:46:00.604 --> 00:46:01.404 Entering variables Use the [+] button in the Variables item to declare an integer variable Number1 and compile/save Enter the value 100 in the Number1 variable 856 00:46:01.404 --> 00:46:02.254 Drag and drop the Get Number1 variable to the Event Graph Connect the output pin of Number1 to the In String input pin of Print String 857 00:46:02.254 --> 00:46:03.123 After compiling/saving and running, check that '100' is printed in the upper left corner 858 00:46:03.123 --> 00:46:04.373 Blueprint Arithmetic Operations Declare integer data type Num01, Num02 variables using the [+] button in the Variables item Add Add node 859 00:46:04.373 --> 00:46:05.623 Add integer variables Num01, Num02 to the input pins, then connect the output pin to the In String pin Subtract, Multiply, and Divide are the same way 860 00:46:05.623 --> 00:46:06.873 Conditional statement The structure of 'if ~ then ~' 861 00:46:06.873 --> 00:46:08.078 Branch node - The flow of execution is divided into True/False depending on the result of the conditional expression Compare the two values ​​and output which one is larger 862 00:46:08.082 --> 00:46:09.782 Event Graph Execution Order Event Graph Execution Order Life Cycle: The cycle of being born, living, and dying 863 00:46:09.782 --> 00:46:11.382 Each created object calls a specific event according to its life cycle When first created: [Event Begin Play] - occurs once 864 00:46:11.382 --> 00:46:12.963 While alive: [Event Tick] - Called repeatedly every frame, continues to show updated image every frame When dead: [Event Destroyed] - object is destroyed