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
€95.85
List Price:  €134.19
You save:  €38.34
£79.54
List Price:  £111.35
You save:  £31.81
CA$143.73
List Price:  CA$201.23
You save:  CA$57.50
A$159.93
List Price:  A$223.91
You save:  A$63.97
S$135.54
List Price:  S$189.77
You save:  S$54.22
HK$777.83
List Price:  HK$1,089
You save:  HK$311.16
CHF 89.34
List Price:  CHF 125.09
You save:  CHF 35.74
NOK kr1,131.88
List Price:  NOK kr1,584.68
You save:  NOK kr452.80
DKK kr715.08
List Price:  DKK kr1,001.15
You save:  DKK kr286.06
NZ$176.75
List Price:  NZ$247.46
You save:  NZ$70.70
د.إ367.26
List Price:  د.إ514.18
You save:  د.إ146.92
৳11,945.33
List Price:  ৳16,723.94
You save:  ৳4,778.61
₹8,493.77
List Price:  ₹11,891.62
You save:  ₹3,397.85
RM450.75
List Price:  RM631.07
You save:  RM180.32
₦154,938.50
List Price:  ₦216,920.10
You save:  ₦61,981.60
₨27,824.38
List Price:  ₨38,955.25
You save:  ₨11,130.86
฿3,419.79
List Price:  ฿4,787.84
You save:  ฿1,368.05
₺3,519.01
List Price:  ₺4,926.76
You save:  ₺1,407.74
B$608.53
List Price:  B$851.97
You save:  B$243.44
R1,830.80
List Price:  R2,563.19
You save:  R732.39
Лв187.32
List Price:  Лв262.25
You save:  Лв74.93
₩144,627.53
List Price:  ₩202,484.33
You save:  ₩57,856.80
₪365.39
List Price:  ₪511.57
You save:  ₪146.17
₱5,882.91
List Price:  ₱8,236.31
You save:  ₱2,353.40
¥15,643.93
List Price:  ¥21,902.13
You save:  ¥6,258.20
MX$2,007.58
List Price:  MX$2,810.70
You save:  MX$803.11
QR364.41
List Price:  QR510.19
You save:  QR145.78
P1,381.63
List Price:  P1,934.33
You save:  P552.70
KSh12,923.70
List Price:  KSh18,093.70
You save:  KSh5,170
E£5,087.81
List Price:  E£7,123.14
You save:  E£2,035.32
ብር12,764.56
List Price:  ብር17,870.89
You save:  ብር5,106.33
Kz91,790.82
List Price:  Kz128,510.82
You save:  Kz36,720
CLP$98,905.10
List Price:  CLP$138,471.10
You save:  CLP$39,566
CN¥729.56
List Price:  CN¥1,021.42
You save:  CN¥291.85
RD$6,087.13
List Price:  RD$8,522.23
You save:  RD$2,435.09
DA13,485.25
List Price:  DA18,879.89
You save:  DA5,394.64
FJ$231.62
List Price:  FJ$324.28
You save:  FJ$92.66
Q770.23
List Price:  Q1,078.35
You save:  Q308.12
GY$20,913.67
List Price:  GY$29,279.97
You save:  GY$8,366.30
ISK kr13,911.60
List Price:  ISK kr19,476.80
You save:  ISK kr5,565.20
DH1,006.07
List Price:  DH1,408.53
You save:  DH402.46
L1,836.70
List Price:  L2,571.46
You save:  L734.75
ден5,900.06
List Price:  ден8,260.33
You save:  ден2,360.26
MOP$800.26
List Price:  MOP$1,120.39
You save:  MOP$320.13
N$1,840.36
List Price:  N$2,576.58
You save:  N$736.22
C$3,678.42
List Price:  C$5,149.94
You save:  C$1,471.51
रु13,597.49
List Price:  रु19,037.04
You save:  रु5,439.54
S/372.23
List Price:  S/521.13
You save:  S/148.90
K405.36
List Price:  K567.52
You save:  K162.16
SAR375.62
List Price:  SAR525.88
You save:  SAR150.26
ZK2,766.46
List Price:  ZK3,873.15
You save:  ZK1,106.69
L477.10
List Price:  L667.96
You save:  L190.86
Kč2,408.98
List Price:  Kč3,372.68
You save:  Kč963.69
Ft39,689.03
List Price:  Ft55,566.23
You save:  Ft15,877.20
SEK kr1,103.13
List Price:  SEK kr1,544.43
You save:  SEK kr441.30
ARS$102,160.40
List Price:  ARS$143,028.65
You save:  ARS$40,868.24
Bs690.76
List Price:  Bs967.10
You save:  Bs276.33
COP$435,928.80
List Price:  COP$610,317.76
You save:  COP$174,388.96
₡50,434.81
List Price:  ₡70,610.75
You save:  ₡20,175.94
L2,537.51
List Price:  L3,552.62
You save:  L1,015.10
₲779,455.88
List Price:  ₲1,091,269.42
You save:  ₲311,813.53
$U4,474.38
List Price:  $U6,264.31
You save:  $U1,789.93
zł408.66
List Price:  zł572.14
You save:  zł163.48
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.