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
€92.78
List Price:  €129.90
You save:  €37.11
£79.40
List Price:  £111.16
You save:  £31.76
CA$136.11
List Price:  CA$190.56
You save:  CA$54.44
A$154.13
List Price:  A$215.78
You save:  A$61.65
S$135.08
List Price:  S$189.12
You save:  S$54.03
HK$782.28
List Price:  HK$1,095.23
You save:  HK$312.94
CHF 90.61
List Price:  CHF 126.85
You save:  CHF 36.24
NOK kr1,085.23
List Price:  NOK kr1,519.37
You save:  NOK kr434.13
DKK kr692.01
List Price:  DKK kr968.84
You save:  DKK kr276.83
NZ$167.80
List Price:  NZ$234.94
You save:  NZ$67.13
د.إ367.19
List Price:  د.إ514.08
You save:  د.إ146.89
৳10,976.08
List Price:  ৳15,366.96
You save:  ৳4,390.87
₹8,339.52
List Price:  ₹11,675.66
You save:  ₹3,336.14
RM473.25
List Price:  RM662.57
You save:  RM189.32
₦141,842.81
List Price:  ₦198,585.61
You save:  ₦56,742.80
₨27,810.04
List Price:  ₨38,935.18
You save:  ₨11,125.13
฿3,647.70
List Price:  ฿5,106.92
You save:  ฿1,459.22
₺3,232.12
List Price:  ₺4,525.11
You save:  ₺1,292.98
B$499.21
List Price:  B$698.91
You save:  B$199.70
R1,908.54
List Price:  R2,672.04
You save:  R763.49
Лв180.65
List Price:  Лв252.92
You save:  Лв72.26
₩135,197.71
List Price:  ₩189,282.20
You save:  ₩54,084.49
₪368.63
List Price:  ₪516.10
You save:  ₪147.47
₱5,633.91
List Price:  ₱7,887.71
You save:  ₱2,253.79
¥15,144.47
List Price:  ¥21,202.86
You save:  ¥6,058.39
MX$1,659.40
List Price:  MX$2,323.22
You save:  MX$663.82
QR364.31
List Price:  QR510.04
You save:  QR145.73
P1,370.91
List Price:  P1,919.33
You save:  P548.42
KSh13,148.68
List Price:  KSh18,408.68
You save:  KSh5,260
E£4,729.52
List Price:  E£6,621.52
You save:  E£1,892
ብር5,680.63
List Price:  ብር7,953.11
You save:  ብር2,272.48
Kz83,612.74
List Price:  Kz117,061.18
You save:  Kz33,448.44
CLP$97,978.20
List Price:  CLP$137,173.40
You save:  CLP$39,195.20
CN¥722.95
List Price:  CN¥1,012.16
You save:  CN¥289.21
RD$5,921.50
List Price:  RD$8,290.34
You save:  RD$2,368.83
DA13,490.83
List Price:  DA18,887.70
You save:  DA5,396.87
FJ$226.12
List Price:  FJ$316.58
You save:  FJ$90.46
Q779.86
List Price:  Q1,091.83
You save:  Q311.97
GY$20,923.51
List Price:  GY$29,293.76
You save:  GY$8,370.24
ISK kr13,946.60
List Price:  ISK kr19,525.80
You save:  ISK kr5,579.20
DH1,013.19
List Price:  DH1,418.51
You save:  DH405.32
L1,763.34
List Price:  L2,468.75
You save:  L705.40
ден5,702.11
List Price:  ден7,983.18
You save:  ден2,281.07
MOP$805.89
List Price:  MOP$1,128.28
You save:  MOP$322.39
N$1,893.44
List Price:  N$2,650.90
You save:  N$757.45
C$3,681.15
List Price:  C$5,153.75
You save:  C$1,472.60
रु13,335.63
List Price:  रु18,670.42
You save:  रु5,334.78
S/370.84
List Price:  S/519.19
You save:  S/148.35
K382.72
List Price:  K535.82
You save:  K153.10
SAR375
List Price:  SAR525.01
You save:  SAR150.01
ZK2,522.76
List Price:  ZK3,531.96
You save:  ZK1,009.20
L461.43
List Price:  L646.02
You save:  L184.59
Kč2,350.75
List Price:  Kč3,291.15
You save:  Kč940.39
Ft36,729.02
List Price:  Ft51,422.10
You save:  Ft14,693.08
SEK kr1,071.30
List Price:  SEK kr1,499.86
You save:  SEK kr428.56
ARS$85,766.82
List Price:  ARS$120,076.98
You save:  ARS$34,310.16
Bs691.04
List Price:  Bs967.48
You save:  Bs276.44
COP$387,583.68
List Price:  COP$542,632.66
You save:  COP$155,048.97
₡50,832.34
List Price:  ₡71,167.31
You save:  ₡20,334.97
L2,468.78
List Price:  L3,456.40
You save:  L987.61
₲737,805.73
List Price:  ₲1,032,957.54
You save:  ₲295,151.80
$U3,781.90
List Price:  $U5,294.82
You save:  $U1,512.91
zł400.73
List Price:  zł561.05
You save:  zł160.31
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.