Skill Acquire - Script #2

16 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
€93.70
List Price:  €131.19
You save:  €37.48
£80.17
List Price:  £112.24
You save:  £32.07
CA$137.56
List Price:  CA$192.60
You save:  CA$55.03
A$155.17
List Price:  A$217.25
You save:  A$62.07
S$135.98
List Price:  S$190.37
You save:  S$54.39
HK$783.01
List Price:  HK$1,096.25
You save:  HK$313.23
CHF 90.89
List Price:  CHF 127.26
You save:  CHF 36.36
NOK kr1,101.16
List Price:  NOK kr1,541.68
You save:  NOK kr440.51
DKK kr699.21
List Price:  DKK kr978.92
You save:  DKK kr279.71
NZ$168.70
List Price:  NZ$236.19
You save:  NZ$67.48
د.إ367.21
List Price:  د.إ514.11
You save:  د.إ146.90
৳10,942.52
List Price:  ৳15,319.96
You save:  ৳4,377.44
₹8,353.31
List Price:  ₹11,694.97
You save:  ₹3,341.66
RM478.30
List Price:  RM669.64
You save:  RM191.34
₦129,687.03
List Price:  ₦181,567.03
You save:  ₦51,880
₨27,754.24
List Price:  ₨38,857.05
You save:  ₨11,102.81
฿3,676.55
List Price:  ฿5,147.32
You save:  ฿1,470.77
₺3,250.48
List Price:  ₺4,550.80
You save:  ₺1,300.32
B$523.28
List Price:  B$732.62
You save:  B$209.33
R1,903.66
List Price:  R2,665.20
You save:  R761.54
Лв183.15
List Price:  Лв256.41
You save:  Лв73.26
₩137,464.20
List Price:  ₩192,455.38
You save:  ₩54,991.18
₪378.95
List Price:  ₪530.55
You save:  ₪151.59
₱5,720.89
List Price:  ₱8,009.48
You save:  ₱2,288.58
¥15,440.72
List Price:  ¥21,617.62
You save:  ¥6,176.90
MX$1,696.11
List Price:  MX$2,374.63
You save:  MX$678.51
QR363.78
List Price:  QR509.31
You save:  QR145.52
P1,378.02
List Price:  P1,929.29
You save:  P551.26
KSh13,298.67
List Price:  KSh18,618.67
You save:  KSh5,320
E£4,850.08
List Price:  E£6,790.31
You save:  E£1,940.22
ብር5,673.01
List Price:  ብር7,942.45
You save:  ብር2,269.43
Kz83,741.62
List Price:  Kz117,241.62
You save:  Kz33,500
CLP$97,883.21
List Price:  CLP$137,040.41
You save:  CLP$39,157.20
CN¥723.83
List Price:  CN¥1,013.40
You save:  CN¥289.56
RD$5,893.56
List Price:  RD$8,251.22
You save:  RD$2,357.66
DA13,447.21
List Price:  DA18,826.63
You save:  DA5,379.42
FJ$227.04
List Price:  FJ$317.87
You save:  FJ$90.82
Q775.43
List Price:  Q1,085.64
You save:  Q310.20
GY$20,874.74
List Price:  GY$29,225.48
You save:  GY$8,350.73
ISK kr14,084.59
List Price:  ISK kr19,718.99
You save:  ISK kr5,634.40
DH1,011.98
List Price:  DH1,416.82
You save:  DH404.83
L1,789.85
List Price:  L2,505.87
You save:  L716.01
ден5,767.34
List Price:  ден8,074.51
You save:  ден2,307.16
MOP$804.17
List Price:  MOP$1,125.87
You save:  MOP$321.70
N$1,897.84
List Price:  N$2,657.05
You save:  N$759.21
C$3,669.73
List Price:  C$5,137.77
You save:  C$1,468.04
रु13,346.58
List Price:  रु18,685.75
You save:  रु5,339.16
S/375.13
List Price:  S/525.19
You save:  S/150.06
K378.96
List Price:  K530.57
You save:  K151.60
SAR375.09
List Price:  SAR525.14
You save:  SAR150.05
ZK2,519.95
List Price:  ZK3,528.03
You save:  ZK1,008.08
L466.17
List Price:  L652.66
You save:  L186.48
Kč2,369.01
List Price:  Kč3,316.71
You save:  Kč947.70
Ft36,915.02
List Price:  Ft51,682.51
You save:  Ft14,767.48
SEK kr1,089.22
List Price:  SEK kr1,524.96
You save:  SEK kr435.73
ARS$86,913.85
List Price:  ARS$121,682.87
You save:  ARS$34,769.02
Bs690.45
List Price:  Bs966.66
You save:  Bs276.20
COP$391,130.80
List Price:  COP$547,598.77
You save:  COP$156,467.96
₡49,957.95
List Price:  ₡69,943.14
You save:  ₡19,985.18
L2,461.44
List Price:  L3,446.12
You save:  L984.67
₲737,867.79
List Price:  ₲1,033,044.43
You save:  ₲295,176.63
$U3,889.78
List Price:  $U5,445.86
You save:  $U1,556.07
zł405.87
List Price:  zł568.23
You save:  zł162.36
Already have an account? Log In

Transcript

Welcome back everyone in this video I want to take some time out to get our interact message showing whenever our player overlaps a trigger volume in one of our diocese. Now, before we get started with this script, I want to direct you to your BP skill base. It's in this directory right here content, Metroidvania blueprints, actors, open up your BP skill base, because what I want to make bigger for this interaction is this trigger volume right here. I have made this adjustment between videos so I'm going to show you exactly what I did. So inside of our BP skill base, select your interact collider over in the components panel. And let me just jump back to a perspective view here.

With your interact collider selected. I went ahead and I changed the location have our interact collider to be x zero y, 270 and Z of 95. And then I changed the box extents to be x 100, y 300 and z 100. So we've got a volume like this out here. And you can see how that translates once we place it in the level. The idea here is that our character is going to be able to overlap this trigger volume.

And when they do we want this sort of a notification or w BP notify to appear directing the player on what button they need to press to interact with that skill Dyess to claim the skill. All right, so with that all in place. The next area I'm going to direct you to is our BP skill double jump. Let's open up this guy. No to that, once a you do. make those changes to the size of your trigger volume in your BP skill base.

Like we did As soon as you Compile and Save that, because our BP skill double jump inherits from the BP skill base, the trigger volume inside of our BP skill double jump will be modified as well. Okay, so just to avoid any confusion I'm going to close out of my BP skill base, open up my BP skill double jump. And inside of here I want to create some script to show that interact message. What I'm going to do is I've got an actor Event Begin overlap Event Tick, I'm going to delete these two out but do not delete out this Event Begin Play and this parent Begin Play okay. We want to leave that. So what we want to do is select our interact collider up in the components panel, and we can right click on this we're going to add an event and we want to add an on component begin overlap event.

Okay then off of this we're going to drag out of the other actor. We're going to cast to our BP player to make sure that it is our BP player overlapping out and then inside of our BP player we just created a variable called can interact. Get can interact. And if you don't recall, here's our my BP player we created this variable for 10 interact. Okay, jumping back to my BP skill double jump. Sorry, I didn't want to get can interact I wanted to set can interact.

We want to make it so that if he is overlapping, that trigger volume we can interact with it. So make sure that that is checked right there. Okay, the next thing I want to do is drag a wire out of Set node here and I want to bring any branch node. And obviously, I need to evaluate some condition. So what is the condition that I want to evaluate? Well, the condition that I want to evaluate is, Does our player already have the double jump skill.

And now I can get a reference to our player straight from our cast to BP player, but also, I can get a reference to our player by coming into my blueprints panel right over here, there's this little drop down, click right here. And if you don't have shown in various inherited variables checked on, you want to make sure that that is checked on because inside of our show inherited variables, we have inherited our interactive object variables, one of them being the reference to a player. So go ahead and drag out a reference to your player that will give us a reference to him. Then drag out of our player and let's see Typing has double jump. This is a boolean variable that exists inside of our BP player. So that is a condition that we are going to be checking against.

Okay, and if this condition evaluates to false, then I want to bring in another branch. And the other thing that I want to check is dragging out of our player once again, type in is using mist we're going to get is using mist. This is working a little bit ahead, but through some testing, we do need to check if our player is using the miscibility because we do not want to do anything if our character isn't misformed. Basically, we don't want our character to be presented the message that they can't interact with With this Dyess, if they are floating around in Miss form, we want them in human form. Okay, so if that is false, we're then going to bring in a where am I looking? Next I want to bring in our interact message variable right here.

Drag and drop that in. We're gonna get that. And something else I need to bring in is our w BP notifier. Drag that guy in. We're going to get that and inside of our w BPH notifier. I want to drag out a wire and type in set received message.

Click the sorry if this is false, make sure you've got this. If this is It's false. We want to set our receive message. And the message that we want to pipe in here is going to be learned skill. Like so. And if you remember, right, these variables right here were created on our BP interactive object.

We're talking this guy way back when. So we created our w BP notify widget. That's this guy right here. We're creating that inside of our BP interactive object base, and then we're setting that to a variable. And remember all of our skill Dyess is inherit from this so that's why we're able to access this variable from our BP skill double jump. Okay, so that's going to set the message here inside of our web notify here to show not interact message, but instead it will show The text learned skill.

Okay, flip in my page and notes. Next thing I want to do, I'm going to drag off of my w BP notifier here and type in Add to Viewport. And another thing I want to do is I want to drag off of our web notifier. And I want to play in animation and the animation that I would like to play. I can also drag out of my w BP notifier. And it is the intro animation.

If you just type in intro right there, you can get that and plug that into the in animation. So the idea here is in our w BP notify, if you remember we created an animation called intro and so we're To tell that to play flare out, just like that. So we're calling all this to happen. We're telling all this to happen inside of our BP skilled double jump. Okay, next thing I want to do is I want to bring in a reference to our s FX can interact. This is an inherited variable as well, we're going to get that.

And then I'm going to drag off of here, and type in play sound to D. And I'm gonna click this little drop down here. I want to set the volume multiplier for this to be five because it's kind of a quiet sound. And if you remember, right, we already determined what this sound effect was going to be. It's this floating UI close, and we set this all the way back in our BP interactive object. We back in the day right They're right there. Okay, so with all that script done inside of our BP skill, double jump, I am going to left click and drag out a marquee selection, hit the C key.

And I'm going to call this show should make this appear on screen here show. Interact, message. Let me try to fit this whole script on screen. So if you want to pause the video, you can see what we have built here. Take careful pans to ensure that you've got this can interact set to true. And another key thing in order to make this script all come together is you got to make sure that your interact object variables over here are showing so that you can reference them.

And again, the way I got that was to click right here show inherited variables. Okay, so with that, I'm going to Compile and Save right away. And I can actually jump in and play right now to see this appear on screen. So right now my player is not overlapping that trigger volume but as soon as I moved to the right, there we go, the message appears saying learn skill. However, if I leave that trigger volume, it still appears on screen and you see that every time I overlap it it is going to show again and again and again. Like so.

And once I escape out of here, I'm gonna get some error messages. Don't worry about those for the time being, this is still a work in progress. Okay, so that is how we make the interact message show. We need to be able to hide it as well. So the way I'm going to do this is I'm going to come under our interact Collider. I am going to right click on that components we will add an event for end overlap.

In here, two out of the other actor We're going to cast to our BP player to make sure that that's the one that ended the overlap. Then I'm going to bring in a reference to our w BP notifier. We're going to get that. Then I'm going to drag out of this. I'm going to type in play animation. Like so, I'm going to drag out of the W BP notifier.

And I'm going to do a search for intro get our intro animation. plug this into the in animation. However, here the play mode for this animation is I don't want to play it forward. I want to play it in reverse. So make sure you make that adjustment. Okay.

And then what I want to do is I want to drag off of our play animation. I want to bring in a delay node, not a retrievable delay, just delay. And I want to drag off of my intro animation here. And what I can find if I drag off of that is a node called get end time. And it outputs a float variable. So that is going to be the duration of our delay.

So that's going to sync this up really nicely. So once we get the end time of that animation, we're going to drag off of delay. Actually, we're not going to drag off a delay just yet. I'm gonna bring in another reference to our w b p notifier. here and the reason I'm gonna get a reference is because I need to drag a wire out of this and type in remove from parents that node right there. So after this delay is done I am telling This w BP notify to be removed from the screen.

That's what this Remove from Parent node does. Then last but not least, I want to bring in another reference to my player here. Get them, drag a wire off of your player. and type in can interact, we're going to set can interact like so. Only this time we're going to leave this unchecked. The idea being that we're going to tell our player that once they're not overlapping that trigger volume anymore, they're not going to be able to interact with that Dyess set out that or that line trace that we scripted in the last video.

Yeah, you can't do it. You need to be interacting, you need to be within this trigger volume and have the message up first before you can interact with it. Okay, so with that meta script, I'm going to left click and drag around all these nodes, type that C key, tap that C key, not type That's the key. And I'm going to call this our hide, interact. Message script. Okay, let me bring this on the screen so you can see this in case you want to pause the video right here.

Make sure that you're reversing that play mode right there that you have this set to false. Let's Compile and Save this and play and see if this is all working properly. Okay, so our player overlaps. And you see the the message there, float away. There, it comes on there floats away, and if I do shift an f1 right here, I can kind of minimize our window here and you can actually see this script in the background. firing off is I am currently ending my overlap.

So watch carefully. And then when I in my overlap, watch the script above. You can see it all fire appropriately. overlap and overlap. Sweet guys that will do it all for this video. more to be done yet but we'll 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.