‫Hello and welcome.
‫We're going to be writing our first blueprint program in this lecture so that when we hit play, we
‫get messages printed to the screen.
‫Let's dive in.
‫You can think of programming in Blueprint, a little bit like wiring up an electrical circuit.
‫You have your different components and you can wire them up so that when a light switch is switched
‫on, then the light will switch on.
‫Now, because we're going to be introducing a lot of new concepts here.
‫I'm going to be building up a little bit of a glossary as we go now.
‫We saw at the end of the last lecture that this thing here is called the event graph.
‫It is the canvas on which we are going to be painting all of our blueprints.
‫And we also saw that we can right click on the event graph to get a list of functionality.
‫Now the first thing I want you to search for is print string, and you're going to see that there is
‫a menu item there.
‫It's under the heading development and if you click it, it brings in something that is called a node.
‫Now a node is a piece of pre-made functionality that we can drop in to our project and use from within.
‫Blueprint and a string is essentially programmer.
‫Speak for text.
‫So what we've got here is this node, when it's activated, will say hello.
‫We can change this to something else.
‫A message like Welcome to warehouse wreckage.
‫Now we might want this message to be displayed to the screen when we begin playing the game.
‫Now we can fortunately do this with another node.
‫If we right click, we can look for begin play and that brings up a menu item called Event Begin Play
‫and this brings in yet another node.
‫Now an event is just a special type of when node it tells us when something should happen.
‫And in this case, the Begin Play event tells us that something should happen when play begins, when
‫the play button is pressed.
‫Now, you may notice that these nodes have got these little arrows in on the left hand side or right
‫hand side, sometimes both.
‫These are known as pins, which are essentially sockets that we can connect up to each other.
‫There are input pins which are on the left and they tell us when to run this particular node.
‫And there are output pins that tell us what to do after this particular node.
‫So if we have a look at this, we've only got an output pin on the event, which makes sense because
‫we know that events are a when node.
‫They tell us when to do something and we've got inputs and outputs on the print string, which means
‫that we can tell it when it should start, which is the input, and then we can tell it what to do after,
‫which is the output.
‫So you can click and drag between these pins in either order to make a connection between the two.
‫And connections are literally just these wires between pins that allow us to connect up that when to
‫the what.
‫So in this case we're connecting up when we begin play, then you should print a string.
‫Let's try this out.
‫If you hit the play button in the toolbar, we should see a welcome to warehouse wreckage string being
‫printed.
‫Now the message doesn't hang around for very long, but that's okay.
‫We don't need it to.
‫It proves the point.
‫Now.
‫If you notice any background hissing while I'm playing the game, that's not my computer fans or background
‫noise in my room.
‫That's actually some ambient sound that is in our default level that is playing when we hit play.
‫If you hit play on your own project, try it out and switch on your speakers.
‫You're going to hear the same sound.
‫Now we can make sequences of nodes in the same way as we could connect multiple light bulbs up together
‫in a sequence, and that would allow us to do one thing and then something else.
‫So I'd like you to take the challenge of printing another message after our first one.
‫So add another print string node by right clicking and searching for it.
‫Connect it up in sequence with our first print string node and then customize the text to your liking
‫a pause video and have a go.
‫Okay, welcome back.
‫So let's exit play with an escape and then I'm going to show you that you can actually drag off the
‫output pin.
‫And then that brings up automatically a search box for you so you don't even have to right click and
‫then I can search for print string and that adds in a new print string node that is in sequence with
‫the previous one.
‫And I can say get ready to rumble.
‫And what that's going to do is if we hit play it prints.
‫Both of them at the same time.
‫Interestingly, the the oldest message goes at the bottom and then the newer one comes afterwards.
‫But as has happened in sequence, we've had one, then the other.
‫There's just no delay between the two because computers are really fast.
‫So make sure that you save your changes.
‫You can save all change files by doing a control shift.
‫SE and I will see you in the next lecture.