Fireball - Player Setup

11 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
€94.67
List Price:  €132.55
You save:  €37.87
£79.13
List Price:  £110.78
You save:  £31.65
CA$140.19
List Price:  CA$196.27
You save:  CA$56.08
A$153.90
List Price:  A$215.47
You save:  A$61.56
S$133.95
List Price:  S$187.54
You save:  S$53.58
HK$778.23
List Price:  HK$1,089.55
You save:  HK$311.32
CHF 88.29
List Price:  CHF 123.61
You save:  CHF 35.31
NOK kr1,103.93
List Price:  NOK kr1,545.55
You save:  NOK kr441.61
DKK kr706.23
List Price:  DKK kr988.76
You save:  DKK kr282.52
NZ$169.87
List Price:  NZ$237.82
You save:  NZ$67.95
د.إ367.25
List Price:  د.إ514.17
You save:  د.إ146.91
৳11,891.45
List Price:  ৳16,648.51
You save:  ৳4,757.05
₹8,441.95
List Price:  ₹11,819.06
You save:  ₹3,377.11
RM447.25
List Price:  RM626.17
You save:  RM178.92
₦166,762.32
List Price:  ₦233,473.92
You save:  ₦66,711.60
₨27,643.94
List Price:  ₨38,702.63
You save:  ₨11,058.68
฿3,455.42
List Price:  ฿4,837.72
You save:  ฿1,382.30
₺3,458.79
List Price:  ₺4,842.45
You save:  ₺1,383.65
B$580.06
List Price:  B$812.10
You save:  B$232.04
R1,807.38
List Price:  R2,530.41
You save:  R723.02
Лв185.40
List Price:  Лв259.56
You save:  Лв74.16
₩139,431.41
List Price:  ₩195,209.55
You save:  ₩55,778.14
₪373.90
List Price:  ₪523.47
You save:  ₪149.57
₱5,890.51
List Price:  ₱8,246.95
You save:  ₱2,356.43
¥15,375.85
List Price:  ¥21,526.80
You save:  ¥6,150.95
MX$2,023.49
List Price:  MX$2,832.97
You save:  MX$809.47
QR362.91
List Price:  QR508.09
You save:  QR145.18
P1,357.62
List Price:  P1,900.72
You save:  P543.10
KSh12,923.70
List Price:  KSh18,093.70
You save:  KSh5,170
E£4,953.11
List Price:  E£6,934.55
You save:  E£1,981.44
ብር12,318.34
List Price:  ብር17,246.17
You save:  ብር4,927.83
Kz91,240.87
List Price:  Kz127,740.87
You save:  Kz36,500
CLP$97,196.23
List Price:  CLP$136,078.61
You save:  CLP$38,882.38
CN¥723.96
List Price:  CN¥1,013.58
You save:  CN¥289.61
RD$5,995.75
List Price:  RD$8,394.29
You save:  RD$2,398.54
DA13,338.53
List Price:  DA18,674.48
You save:  DA5,335.94
FJ$226.94
List Price:  FJ$317.73
You save:  FJ$90.78
Q768.81
List Price:  Q1,076.37
You save:  Q307.55
GY$20,819.01
List Price:  GY$29,147.45
You save:  GY$8,328.43
ISK kr13,756.62
List Price:  ISK kr19,259.82
You save:  ISK kr5,503.20
DH996.34
List Price:  DH1,394.91
You save:  DH398.57
L1,817.34
List Price:  L2,544.35
You save:  L727.01
ден5,825.76
List Price:  ден8,156.30
You save:  ден2,330.54
MOP$797.89
List Price:  MOP$1,117.08
You save:  MOP$319.18
N$1,802.21
List Price:  N$2,523.16
You save:  N$720.95
C$3,662.39
List Price:  C$5,127.50
You save:  C$1,465.10
रु13,434.94
List Price:  रु18,809.46
You save:  रु5,374.51
S/378.24
List Price:  S/529.55
You save:  S/151.31
K400.31
List Price:  K560.45
You save:  K160.14
SAR375.36
List Price:  SAR525.52
You save:  SAR150.16
ZK2,744.04
List Price:  ZK3,841.77
You save:  ZK1,097.72
L471.18
List Price:  L659.67
You save:  L188.49
Kč2,396.54
List Price:  Kč3,355.25
You save:  Kč958.71
Ft38,535.91
List Price:  Ft53,951.82
You save:  Ft15,415.90
SEK kr1,097.18
List Price:  SEK kr1,536.10
You save:  SEK kr438.91
ARS$99,841.85
List Price:  ARS$139,782.59
You save:  ARS$39,940.73
Bs687.64
List Price:  Bs962.72
You save:  Bs275.08
COP$442,190.80
List Price:  COP$619,084.81
You save:  COP$176,894.01
₡50,678.85
List Price:  ₡70,952.42
You save:  ₡20,273.57
L2,513.64
List Price:  L3,519.20
You save:  L1,005.56
₲775,611.66
List Price:  ₲1,085,887.35
You save:  ₲310,275.69
$U4,292.93
List Price:  $U6,010.28
You save:  $U1,717.34
zł409.79
List Price:  zł573.73
You save:  zł163.93
Already have an account? Log In

Transcript

Welcome back everyone. In the last video we went about creating our BP fireball. In this one Our goal is to set up our player with the appropriate components, variables, functions, etc. In order to lay the groundwork for our player actually shooting out a fireball. So the first thing I would like to do here is to import a sound effect. I've got a fireball shooting kind of sound effect that I want to import.

You should find this attached to this particular video in the course outline. I have mine in my file explorer here. So I'm going to come to my Metroidvania audio folder, where we have been dumping our various sound effects. And with Windows Explorer open here, I'm just going to drag and drop my SF x fireball. Left click drag it down into this folder. You should be able to Find this file after you have downloaded it likely in your downloads folder, although you may have it downloading elsewhere, that will be up to you to find.

Okay, so with that imported, we can then go inside of our BP player and start working in there. So come under blueprints, characters, there's our BP player, open it up. And I've got some existing tabs open from the previous videos, I am just going to close out quickly only concerned with the BP player for now. I'm going to click on the viewport tab. So we get to see our character few things I want to add in here. The first I'm going to add is a fireball spawn point component.

That's the point that we're going to designate where we want our fireball to shoot out from. And this is going to be from an arrow component. So in my list of components, I'm going to click Add Component and I'm going to do a search. For an arrow component, there's utility arrow. There it is, and I will name it fire ball spawn points. Okay, it's this giant red arrow sticking out from our character's pelvis.

At the moment, select that. And with that selected over in the Details panel, let's change the x location of this to be 70. It's going to put it out in front a little bit, and I'm going to change the Z location to be 20. Now why this exact location? Well, because when we have our character playing a sort of casting animation, or hand is going to end up at right about this position. So that's about the spot where I want the fireball to spawn from, we can leave the rotation and the scale as is.

Okay, so with that in place, we're gonna go on to creating some variables down in our My Blueprint panel, and we're going to be working inside of our magic black fireball section of Variables right here. So when we add some variables we're going to add them to this grouping this category. Okay, so the first variable we're going to add by clicking plus variable is going to be called renaming it here. Be Used fireball course question mark this will be a Boolean again I'm going to put it in my magic black fireball a category now this use fireball the primary use of this one is going to be to drive our animation we're going to have a you know fireball casting animation. So that is a variable that's going to be passed to our animation blueprints by defaults if I compile this, I do want this to be false.

Okay, creating a another variable here coming under variables plus variable. I'm going to create one called be fire ball. Ready, question mark. This will also be in our magic black fireball category. compile this is well, and of course it changed my variable name here. I must have screwed up there.

So be fireball ready? was what I wanted to call this question mark, compile that and I do want this to be true by default. Okay, um, this one is going to sorry let me flip my page notes here. So this is gonna set true again after a delay here, this fireball ready. It's going to act in concert with our next variable that we're going to be creating here. So create a new variable.

This one is going to be a fireball cooldown. We will make this a float variable Put this in our category of magic black fireball compile and the default time I want to set for this is going to be 1.13 seconds why that weird value? Well because that is about the length of time that our casting animation is when it plays and I basically want to make it so that we can cast a fireball again once that fireball casting animation has finished up so you can't spam it over and over and over again. Okay, I'm just gonna be doing some reorganization of my variables here because I'm a DD like that so I've got B has B magic fireball on top the next one I'm going to put is be use firebomb left clicking and dragging over here. Then be fireball ready. Then our fireball cooldown left clicking and dragging that right up there.

Then we got data in attributes that is all looking splendid. Okay, earlier in the course We made a function called update man on, we need to jump in here and update it because we now have some mana cost values that we want to take into consideration. So you can double click on this Update Manager right here. And if you remember right, this is where we left off and on this node right here, I even left a note that said that this is temporary. Okay, what I need to do here is select our update Amana input node. I'm going to click right here to add a new parameter and I'm going to call this magic attributes.

And our variable type here is going to be our struct str magic attributes. Okay. Now, I am also Going to add another output here, click this plus new parameter. And this one is going to be called Sorry, I do not want to add one there, that is my bad. I don't want to add one there, scratch that I'm looking ahead my page notes. That's not the one I want to add out of our update man here.

So now we've got this magic attributes input node right here. I'm gonna drag out of this in type in a break the magic attributes. Because if you remember in this struct, if I expand this down is got a mana cost associated with it. And I'm going to plug this into this subtraction node right here. So when we cast a fireball spell, we're going to be calling this function and we're going to be taking our current manna amount and we're going to be studying tracking the appropriate manner cost based on whatever it is we're trying to cast. In this case it would be a fireball, which I believe was five manna, I don't really recall off the top of my head, I can right click on this node and get rid of this temporary node comment for now.

Okay, so this function is looking pretty good I do need need to create another function inside of our BP player here. So if I come over here into my my blueprints, panel functions, we're going to create another function. This one is going to be called check, if, check if enough manna to use magic. And I think that function name pretty much describes what we're looking to do here. So here I'm going to select my entry tunnel note. I'm going to add that input.

This one is also going to be called Magic attributes. Let me capitalize that magic attributes. It's got that str magic attribute struct already listed in there, which is what I want that I'm going to right click in some empty space here in our graph, and I'm going to add a return node. And with that selected, I want to add an output to this by clicking this plus parameter button. And I must have clicked rather fast. It already added one on there, I am going to change this to be enough mana question mark.

This is going to be a boolean variable. So we're going to do an evaluation here to see if we have enough mana to actually cast the spell, in this case, the fireball. So the way we're going to do this is we're going to drag out of our magic attributes. We're going to break that structure we are going to drag out of our manner costs in the input in a less than or equal to sign. And the thing we want to evaluate is if our cost is less than or equal to our manna current. And where did I put that in player attributes, there it is man a current, left click and drag that on top right here.

And right up above here, we're going to bring in a branch node, hold down B and left click, that is going to be the condition we're going to check against in this function. Hook this in. And if this is true, sorry, we actually don't even need that. We don't even need this branch My bad. We can plug this directly into our enough manner return node. So this is our function right here.

Alright, let me check my page notes to see if we have missed anything. No, that looks to be it for this video let's Compile and Save quickly. still more work here to be done. We still need to create the use fireball script that is upcoming. We will see you guys in the next video.

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.