Black Magic Menu - Script #5

17 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€95.83
List Price:  €134.16
You save:  €38.33
£79.50
List Price:  £111.30
You save:  £31.80
CA$143.90
List Price:  CA$201.46
You save:  CA$57.56
A$160.64
List Price:  A$224.91
You save:  A$64.26
S$135.72
List Price:  S$190.01
You save:  S$54.29
HK$776.05
List Price:  HK$1,086.50
You save:  HK$310.45
CHF 90.18
List Price:  CHF 126.26
You save:  CHF 36.07
NOK kr1,135.65
List Price:  NOK kr1,589.95
You save:  NOK kr454.30
DKK kr714.78
List Price:  DKK kr1,000.72
You save:  DKK kr285.94
NZ$176.84
List Price:  NZ$247.59
You save:  NZ$70.74
د.إ367.26
List Price:  د.إ514.17
You save:  د.إ146.91
৳11,966.34
List Price:  ৳16,753.36
You save:  ৳4,787.01
₹8,552.86
List Price:  ₹11,974.35
You save:  ₹3,421.48
RM446.65
List Price:  RM625.33
You save:  RM178.68
₦154,954.50
List Price:  ₦216,942.50
You save:  ₦61,988
₨27,870.41
List Price:  ₨39,019.69
You save:  ₨11,149.28
฿3,411.05
List Price:  ฿4,775.61
You save:  ฿1,364.55
₺3,526.84
List Price:  ₺4,937.72
You save:  ₺1,410.88
B$622.57
List Price:  B$871.63
You save:  B$249.05
R1,877.39
List Price:  R2,628.42
You save:  R751.03
Лв187.63
List Price:  Лв262.69
You save:  Лв75.06
₩147,402.34
List Price:  ₩206,369.18
You save:  ₩58,966.83
₪366.10
List Price:  ₪512.56
You save:  ₪146.45
₱5,787.77
List Price:  ₱8,103.11
You save:  ₱2,315.34
¥15,786.12
List Price:  ¥22,101.20
You save:  ¥6,315.08
MX$2,037.77
List Price:  MX$2,852.96
You save:  MX$815.19
QR364.86
List Price:  QR510.83
You save:  QR145.96
P1,392.51
List Price:  P1,949.57
You save:  P557.06
KSh12,923.70
List Price:  KSh18,093.70
You save:  KSh5,170
E£5,086.12
List Price:  E£7,120.77
You save:  E£2,034.65
ብር12,775.73
List Price:  ብር17,886.54
You save:  ብር5,110.80
Kz91,190.88
List Price:  Kz127,670.88
You save:  Kz36,480
CLP$99,000
List Price:  CLP$138,603.96
You save:  CLP$39,603.96
CN¥729.85
List Price:  CN¥1,021.82
You save:  CN¥291.97
RD$6,089.32
List Price:  RD$8,525.29
You save:  RD$2,435.97
DA13,523.04
List Price:  DA18,932.80
You save:  DA5,409.76
FJ$232
List Price:  FJ$324.81
You save:  FJ$92.81
Q771.86
List Price:  Q1,080.63
You save:  Q308.77
GY$20,936.54
List Price:  GY$29,311.99
You save:  GY$8,375.45
ISK kr13,809.61
List Price:  ISK kr19,334.01
You save:  ISK kr5,524.40
DH1,010.12
List Price:  DH1,414.21
You save:  DH404.08
L1,844.84
List Price:  L2,582.85
You save:  L738.01
ден5,904.06
List Price:  ден8,265.92
You save:  ден2,361.86
MOP$800.42
List Price:  MOP$1,120.62
You save:  MOP$320.20
N$1,875.49
List Price:  N$2,625.76
You save:  N$750.27
C$3,684.93
List Price:  C$5,159.05
You save:  C$1,474.12
रु13,704.96
List Price:  रु19,187.49
You save:  रु5,482.53
S/374.64
List Price:  S/524.51
You save:  S/149.87
K400.61
List Price:  K560.88
You save:  K160.26
SAR375.43
List Price:  SAR525.61
You save:  SAR150.18
ZK2,775.82
List Price:  ZK3,886.26
You save:  ZK1,110.44
L476.97
List Price:  L667.78
You save:  L190.80
Kč2,418.02
List Price:  Kč3,385.32
You save:  Kč967.30
Ft39,407.88
List Price:  Ft55,172.60
You save:  Ft15,764.72
SEK kr1,098.38
List Price:  SEK kr1,537.78
You save:  SEK kr439.39
ARS$102,864.61
List Price:  ARS$144,014.57
You save:  ARS$41,149.96
Bs691.77
List Price:  Bs968.51
You save:  Bs276.73
COP$439,472.10
List Price:  COP$615,278.53
You save:  COP$175,806.42
₡50,793.98
List Price:  ₡71,113.60
You save:  ₡20,319.62
L2,543.82
List Price:  L3,561.45
You save:  L1,017.63
₲778,417.60
List Price:  ₲1,089,815.78
You save:  ₲311,398.18
$U4,386.09
List Price:  $U6,140.71
You save:  $U1,754.61
zł409.57
List Price:  zł573.42
You save:  zł163.84
Already have an account? Log In

Transcript

Welcome back. Once again, everyone, we are continuing to make some progress with our black magic menu selections. Let's hop right to it. We are in our content Metroidvania widgets folder, open up w BP B magic menu because that's where we're going to be doing our work. Again, the goal for all this is to provide feedback to the user that a given magic is being selected. So we're going to hop on over to our Graph tab, we left off working in our select magic macro.

For this one, we're going to be working in our Event Graph. So if you don't have an Event Graph tab right here, in the My Blueprint panel, you should find a graph for event tab. You could double click on that to open that up as well. Currently, this is the only bit of script that we have in here a reference to the player. I am going to right click within this graph and we're going to add an event tick. Now you Usually it's not a real good idea to place a lot of script after Event Tick because it can be damage you know your performance, but this is going to be pretty light so I'm not really scared to use it here.

Event Tick is going to be firing off every frame and after Event Tick, I want to bring in my select magic macro from the My Blueprint panel, drag and drop that in your graph. And there we go. every frame that this black magic menu is open, we're going to determine which magic we want to have selected. So nextly over in your mind Blueprint panel, you're gonna want to find where you've got all of these different variables we've got like arctic blast, image, man, ACOs, name, etc. Because we're gonna be dragging and dropping a lot of these in the graph. Specifically, for right now we're going to be bringing in our fireball Selected image, bring that guy in, we're going to get that.

And I'm going to use some shortcuts here by holding down control. I've got fireball selected, I want electrical sparks selected, holding down control, left clicking to get a getter, then I want blood lust selected, holding down control, bringing that in and then arctic blast selected that guy right there. Holding down CTRL left clicking to bring in a getter. What do I want to do for all of these if no magic is selected? Well, what I want to do is drag off any one of these four and say we want to set the visibility of that particular piece of art. So if no magic is selected, we want to set the visibility of fireball, electro Spark, bloodlust and arctic blast Do we want them to be visible?

No, if no magic is selected, we want them to be hidden. So by our fireball selected image, what I'm specifically referring to jumping back to our Designer tab is do fireball selected, we're talking about that yellow ring that right there. So we want to make sure that that is hidden if no magic is being selected. Okay, I also want to bring in my new magic selected, there it is my no magic selected image, left click and drag that in. We get that I'm going to drag off of this. Bring in a net another set visibility node.

And I want to make sure that this one is visible by that I am referring to no magic selected. Do that middle one right there. So we're not playing To the left or right or up or down, we're going to have that middle portion selected that yellow icon right there. Okay, that's all we're looking at well and good. Something else we want to make sure that we do is we want to make sure that we unselect unselect, all magic text effects. This is a function that we created earlier.

And let me just double click on it to open it up. It's going to take in an array and we're essentially going to make sure that our font is stylize in such a way that it does not look highlighted. Okay, so jumping back to our Graph tab here the Event Graph. I am going to bring in our unselect all magic text effect. Over here, make sure execution wire is plugged into this. And now I need to say which text do we want to unhighlight Well, if I drag backwards often This I can type in a make array that an array is like a list of things.

And I'm going to add a couple more pins here 123 and four. And the things that I want to unhighlight will include Designer tab, you see all these texts, Ron, I have a hard time selecting these as well. Well, I might have an easier time over here. Let's see the do name, fireball name. So where it says like fireball name, electro spark name, etc. Now for any of these, if you see me pulling in reference to them over in the Graph tab, and you don't see them over in the My Blueprint panel like you're not seeing them over here.

Make sure that over in the Designer tab if you don't see any of those that for whatever widget you should be able to bring in as a variable that you've got this ease variable checkbox checked out. For many of them, it is by default. So let me jump back to my Graph tab I want to say fireball name I want to make sure that you are on highlighted electro spark name, you are on highlighted. This is just kind of a heavy handed way of saying nothing is highlighted bloodlust bloodless name and arctic blast name. So that's how I want to present this black magic menu if we have no magic selected, also what I want to do, continuing our chain of execution here. I'm going to bring in a reference to our player, drag and drop him in the graph.

And then we're going to drag on him and say, Be magic. slotted we're gonna set our be magic slotted to none, so this is basically telling our player Hey, you have no black magic slot and no fireball no electro Spark, nothing is queued up for you to use. You can't use anything right now because you didn't choose anything haha. All right, and next we're going to bring in a do once No, there is a shortcut for that hold down the O key left click there is a do once node. And I'm going to plug this into the reset of a do once node, you're like well wait a minute, what's going to plug into here? Well, that is going to come up in a little bit.

We're going to be plugging some stuff in here. But just to keep following along with my notes here. Upon completion of all of this, I am also going to play a sound 2d and the sound that I am going to play is going to be VR underscore grab Q. Again, this is an engine content found so you can come under View Options show engine content if you don't have access to that for the time being. Alright, so now the question becomes, what do we want to do if some of these other things are selected such as our fireball, I'm glad that you asked to help take a little bit of a shortcut here, I'm going to left click and drag around our set visibility our to set visibility nodes up here Ctrl C. And I'm going to Ctrl V them down here. And actually, before I do any of this, I'm just going to left click around all these nodes up here from our initial set visibility all the way to like our do once node right up here, gonna tap the C key right around that and say that this is our no magic selected, just to kind of make this easier to read.

These two guys, we're gonna be making some more use of them in just a little bit. Okay, so if We are selecting our fireball, we're going to plug into this initial set visibility node. And the first thing we want to do is check our fireball selected. Image bring that in, we're going to get that make that our target. Only we don't want this one to be hidden we want this one to be visible now. So by that we are saying that we want over in our Designer tab here if fireball is slotted right here, we do want that yellow highlight to exist right around the icon itself.

Okay, but then we also want to set something else to be invisible. Set this next set visibility visibility to be hidden. And what do we want to be hidden here? Well, we want our no magic selected highlighter to be hidden. And by that I'm referring to jumping back to our Designer tab, this middle circle there's going to be No yellow circle here to show that nothing is highlighted. Okay, after this, I am going to bring in one of the functions that we made earlier a select magic text effect.

Drag and drop that in. hook that up via the execution wires. And we want to set our text to highlight here to be the fireball name, fireball name, where are you left click, drag that right on top of the text to highlight. So that'll make our fireball name over here in the Designer tab, this text that currently says some magic. It's gonna make it so it's got that cool sort of effect that we created earlier. And we remember that material.

And do you remember that function if I double click on this function, which I just did, you can see that it's going to make it so our outline sizes seven We're enlarging the font and we're also going to be applying that outline material. So a lot of things going to be happening when that function gets called. Okay, what else do we want to do here? Well, we want to bring in a reference to our player once again. We're gonna get our player and off of this I'm going to type in a be magic, slotted get the magic slot it what not get it, I want to set it be magic slot ID. We're gonna set that.

And now we're going to set this variable on our player to be what you might expect the fireball, thus making it so our player can shoot out fireballs if they have enough mana. That's pretty cool. And then the output of this we're going to plug into the do once node here. We're going to play this sound one time saying it's kind of just a Confirm sound if you will, just letting you know that you have slotted in some magic. Okay, so with that I'm going to left click and drag around this group of nodes, hit that C key and type in fire ball selected. Now the rest of this becomes a lot easier because these four nodes right here, I can left click drag out a marquee selection, hit Ctrl C to copy Ctrl V to paste once, twice in the third time, and now all we need to do is swap out the appropriate variables and whatnot to make them work appropriately.

So let's start with where we left off here and I'll kind of bring these nodes down with me as I'm working just so you can get a hang of what we're building here. So when we are selecting our electro Spark, let's plug this into here and change this to be electro spark selected Instead of fireball selected, I don't want fireball to be selected, at least that to be shown I want electro sparks selected that piece of art I want that to show up that yellow ring. This can stay the no magic highlighted is going to be hidden and our select magic text effect is not going to be the fireball name. It's going to be the electrical spark name. And here we're going to set our be magic slot and we're going to tell our player that now they have slotted in electro sparks so they can use that ability and make sure you plug this into the execution of the do once no not the reset.

The reset only comes when no magic is selected. Okay, let's keep on working on down this is getting exciting. We're getting there guys. bloodless selected when this is selected. We'll plug into here let's change the title of this to be blood Just selected. Instead of our fireball selected that yellow ring for the fireball, it'll be our bloodless, selected piece of art.

This can say the same instead of a fireball name, it's going to be our bloodless name. And here we're gonna say we don't have fireball slotted we've got bloodless slotted, and this will plug into the do what's known as well to play that sound. Excellent. Last one. drag these down when arctic blast is the one our player is trying to select. Let's plug that into here.

We will call this arc dick blast selected. Not the fireball selected piece of art but the arctic blast selected that yellow ring surrounding that piece of art on our Blackmagic menu. Not the fireball name that's not what we want to apply our text effect to but the arctic blast name and we need to change our magic slotted we need to tell our player that nope now they've got arctic blast slotted last but not least plug this into the do once node execution wire as well. Let's just kind of tidy this up a little bit make this look a little bit nice neater like so. And I'll try to frame this all up in views so you can have a good gander at what we have built. Not too shabby.

Let's go ahead and quickly Compile and Save. And let's cross our fingers and give this a play now, before I bring on the black magic menu I'm going to acquire some of our skills here are fireball and man I really need to make that button show up on our notification there. The button is missing from our Learn black magic overlay there. We will fix that up soon. So now we've got learned fireball. You can already see now that I've got the fireball learned it shows up on the black magic menu.

Let me just acquire the electro spark ability as well. Okay, now let's check out the magic bringing on my black magic menu. There we go. And I'm going to use the w a s and D keys to select my different magics. Pretty sweet. Now note that I did as I do our text is enlarging and that material is playing.

I'll be it a little fast that I could certainly use some adjusting it doesn't look great, but it's an effect. And you can see that as I am selecting different things up in my quote unquote HUD area in the upper right it is showing which magic I am currently trying to slot into that slot. So right now I've got nothing selected right now Notice that if I am selecting a fireball with my black magic menu on here I'm leaving this menu with my D key held down. Look, black magic is now slotted in shoot out a fireball. Gonna hold down the zero key let's change this to be electro spark I'm holding down the A key as I release my zero key to exit out of the black magic menu. impressing upon us that ability pretty sweet if I do say so myself, guys, really nice job on this one.

That'll do it all for this video. We will see you in the next one.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.