Welcome back everyone in this video Our goal is to create bindings for our specific magic selections. Here I'm talking some of these names, some of these images and some of these manna costs now, I think we're gonna split this off across two videos because there's a lot of work to be done here. Let's jump right to it. If you're not already in your W BP be magic menu, come to your content Metroidvania widgets folder. This is where we are working w BP magic menu. Let's open it up.
And immediately I'm going to jump on over to my Graph tab. In some empty space here if you don't already have an event construct out here, which usually there's one by default, but I believe we deleted it earlier. I'm going to right click and type in events construct. This is kind of the the Begin Play if you will, for when this widget is shown this fires off And then right below that, I'm going to get player character. And then I'm going to drag off of that and cast to our BP player. Like so.
And then I'm going to right click on this as BP player and I'm going to Promote to Variable. So what I'm saying here is, right away when we generate when we show this B magic menu, I want to create a reference and save reference to my BP player. So I promoted that to variable up over here or down here. As a matter of fact, you can just rename this to be Hilaire. And it says we already have a player out here that's because when we were going to delete that one, when we copied this over from our web p HUD if I jump on over to the graph, in the variables section, we had already created a reference to our player. Isn't that fine and dandy?
So what we can do here is with that variable already created, I can simply drag and drop it right on top of our BP player like this. And there we go right away. When we generate this menu, we're going to cast our BP player and set this variable to be our BP player. So just note that if that, for whatever reason wasn't existing out there, you could have right clicked on this particular pin promoted to a variable and named that variable player. Okay. Yes, we will delete that.
I'll left click, drag a marquee selection and say that this little bit of script is a reference to player. Okay, with that in place, we can go about creating some bindings way more easily. So I'm going to jump back to my Designer tab up here. We're going to be referencing the player a lot. I'm going to start with my w magic. Text ready, I'm talking this way up here, the W magic text ready, select that guy over in the Details panel.
Under the behavior section, I'm talking right here, where it says visibility, we're going to create a binding for this, click right here, we're going to create a binding. And it's gonna jump us on over to the Graph tab. And if I scroll up in the My Blueprint panel, there is the function it is prompting me to make. I'm going to rename this right away hitting f2 on this to get get w magic underscore. Ready. Actually, I'm not going to do the underscore ready, visibility.
Now I've got all of these other different functions out here. I could delete these out because we created these ones. We did our w BP HUD. I'm going to leave them there for the time being and I'll just go ahead and create the ones we're intending to make. So get the W magic visibility ready. Okay, so what do we want to do in this function that we're creating?
Well, all we need to do is get a reference to our player. Let's come over to the variable section, drag in a reference to your player, get them and then we're going to drag out of our player and do a search for W magic. Ready. We have a variable that exists that exists inside of our BP player called is W magic already. And we're going to deal with this little bit more when we create some of our white magic skills, our mist and our Lens of Truth, toggling that on and off to be true or false. And anyways, we are going to plug this into a select node.
I'm looking for this node right here, it's kind of got that three prongs on the arrow off of it, select node. And I'm going to plug the return value of this into the return value of the return node. And the Select node is going to kind of blow up like this. And what I want to do is I want to say if W magic is false, I want this text here to be hidden. However, if our w magic or white magic is ready to be used by the player, that is the cooldown has expired and it's ready to be used. Then we want this text to be visible.
So this is a way for us of making this text here on our black magic menu, show or hide. Okay, let's go down to the next one here. I'm going to go into electro spark image. Select that guy right there and we're talking about this image that's going to fit in this part of our black magic menu electric spark image. come under the appearance brush section right now it's just t magic empty. Let's create a binding for this, click binding create binding.
And I am going to be prompted to give this a name again up in the function section, hit f2. On this let's just call this set electro spark image. I'm going to create a little space between these two and I'm going to bring in a reference to my player. We're going to get that the first thing I want to ask dragging off of my player is has be magic. electro Spark. Get has the magic electro spark does our player have the electro spark ability even and we're going to plug this in To a select node, that same sort of select node right there and this is going to have a true or false as well.
So if we do not have our be magic electro Spark, what I want to do is I want to take our magic empty variable, this slate brush right here. This also came over when we copied over our w BP HUD this magic empty. Notice it's variable type is slate brush, and its value is tea magic empty, we're going to plug this into the false of our select. Now if we do have be magic electric Spark, if that is true, what do we want our image to be? Well, we can get this by bringing a reference to our player. Once again, I'm gonna get that.
Then I'm going to drag off this and type in electro spark attributes You remember we have this electro sparks attributes struct inside of our BP player. And if I drag off of this and I break this open inside of this struct, we have an icon slate that determines the image that we want to see if we have electro Spark. So I'm going to plug this return value into the return value of the return node. And that should then set that to be the proper image. Let me just kind of snug this up like so. Because eventually we're going to copy and paste some of this stuff to make setting images and whatnot for our other, our other skills a little bit easier.
Just to kind of drive home the point here, I'm just just gonna jump on over to my BP player. And in my magic black electro sparks section, I've got the electro sparks attributes with We just pulled out in our beat magic menu, electric spark attributes, electro spark attributes and inside this struct. Here we've got this icon slate this image. So that's what we're saying to us over here in our w BP be magic menu, if our player has the electro spark skill, if that is true, this is the image that we want to show and if it's false, we just want to show that slot is empty. Okay, let's move on to our electro spark name. So right now it says some magic we don't actually want that to say some magic.
So coming over to the Details panel next to the text section. Let's create a binding here, bind create binding. That's gonna jump us on over to the Graph tab. Here in our functions, let's rename this function. I'm going to set this to be You electro spark name okay and a lot of the same concepts are going to apply here from what we just did firstly I'm going to bring in a reference to our player so coming under the variable section there is a reference to my player going to get him going to pull off of this and find out do he does he have electrical spark get has electrical spark like so then we're gonna bring in a branch dragging off that bringing in a branch node let's hook in our execution wire into that and I want to find over here next in the variable section are electro spark man a cost electro spark man a cost electro Sparkman accost electric spark image selected Let's come back to our Designer tab and I'm looking for electrical spark man it costs this particular text widget right here and over in the Details panel I can set this to be is a variable i am going to check that on.
In doing so over in my Graph tab, Electra spark man A cos is now a variable that I can left click and place into my graph, I can get it with that I can drag off of this in typing set visibility. And what I want to do is I want to say that if our player does have the electric spark ability if that is true, I want to set the visibility of this text widget this electric spark man accost. I want to make sure that that visible. However, I'm going to copy and paste this set visibility node right here Ctrl C Ctrl V. If this is false that our player does not have the electro spark ability, I'm going to take electro spark man across and plug it into this target as well. Then I want to set this to be hidden. Okay, so I'm going to plug both of these into the execution of our return node.
But we're not finished yet. I want to plug something into this return value as well. Because our electric spark name currently says some magic and we don't want it to say some magic. Rather, you don't want I got my electro spark name here. And what I really want it to be setting not my electro spark man ACOs here is I wanted to make sure that I was grabbing my electric spark name my bad electric spark name I'm gonna select that and set that to be his variable I selected the man accost that use my bad so I'm gonna come back to the graph in Now note that I had electric spark man ACOs right here I actually wanted electro spark name this is what happens when you work long days. electro spark name let's make sure we get that in there our function is electro spark name and somewhere along the way I decided we were working on electro spark manna costs only.
Okay, so dough Do we have electric spark? If we do we're going to show the electric spark name if we do not we are going to hide the electric spark name. And what do we want to print out into that electric spark Name field? Well, to get that to be proper, I'm gonna drag out of my player. Type in electrodes bark attributes I want to get the electric spark attributes get electro spark attributes there they are. Then I'm gonna drag off of this and I'm gonna break it open.
And there is my name right there. So I can plug this into the return value like so. Okay, let's Compile and Save that right away. And let's move on to our electrical spark man ACOs. So jumping back to the Designer tab, here is going to be our electro spark man ACOs, that particular widget right down there. So let's come over to where it currently says 99 over in the Details panel and choose right here to create a binding.
That's going to jump us over to the Graph tab prompt us to create a function I'm going to rename this right away in My Blueprint as set up electro Spark, manna and there's gonna be a lot of similarities here between our set electric spark Manoj and set electro spark name. So I'm gonna jump over to my electric spark name tab, which is right here, and I'm going to left click and drag and I'm going to copy these nodes right here, not that one. So Ctrl plus click to unselect that with these nodes all highlighted, I'm going to Ctrl C, then jump back to my set Electra spark Manage tab by double clicking on it. I'm going to hit Ctrl V, to paste them all in, and then I'm going to swap out the things that I need to swap out. So right away Let's get our set electro spark manager plugged into a branch node.
All this is going to remain relevant the B has been magic electro spark and the electric spark attributes. However, I want to swap out the electric spark name here with electro spark Manoj now's the time where this should actually be used so electro spark Manoj we're going to get that the manic cost I should say that is going to be our target. Here's that's going to remain visible appear hidden down here. Let's make sure this execution wire is plugged into the return note as is this execution wire and I just want to make sure that I get my execution wires plugged in for this set electric spark name I did good. So jumping back to our set electric spark Amana. Okay, so here in the return value, what I'm looking for, I'm going to click this little drop down.
I'm looking for the mana costs, how much does this electro spark man cost? And that's the value that I want to plug in. So I'm going to drag off of this and I'm going to type in round That's gonna make it so that we can get an integer value not a float value. And then if I plug this into the return value, it's going to convert my integer into a text like it needs to be. Okay so that is looking pretty swell as well okay, I'm going to Compile and Save here. Now what I'm going to suggest that we do at this point I'm going to come back to the Designer tab with all of our texts here and you can multi select them over here in the hierarchy is probably the easiest way to do it by that I'm talking about fireball name.
It's highlighting are some magic over there. Let's do bloodless name, arctic blast name. I'm just holding down control for all of these. So I got all three of those selected and I want to make all of those is variable because we're going to ones that actually not gonna let me do if I multi select them unfortunately, let's do fireball name Let's set is variable Let's go bloodlust name is a variable, I thought it would allow me to do all three. Let's do arctic blast name is variable, same with a man of cost for all three of those, set those to be his variable right away because we are going to need to use those in the functions that we're going to be creating for all of these bindings. Okay, so you just saw how I created bindings for our electrical spark over here and I created bindings for the title, the amount of cost and even the image that's going to appear in here as well.
What I am going to do now is I'm actually going to recreate all of those bindings for the rest of these three because the process is going to remain largely the same as what we just did for our electro Spark. So rather than bore you and do this all on video, the exact three bindings that we just did for the image Name and the manner I'm going to do them and then share them all with you in case you get lost along the way. Okay, so I'm going to Compile and Save at this point. That's gonna do it off of this one. In the next one. I'll share with you what I've built.
We'll see you there.