Mist - Gate Script

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.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 we have two goals. Goal number one is to make it so that we show or hide a notification message. Whenever a player approaches the Miss gate, letting them know that they need that missed skill in order to pass it. Goal number two is to ensure that our player when transformed intimus can actually pass through that gate in order to do the ladder and will actually do the ladder goal first ensuring that they can pass through the gate. Let's go ahead and place our BP Miss gate into the level and it's going to come in facing the wrong way.

And I suppose in the blueprint itself, I probably could have rotated this to ensure that it would always be facing the way I want it to but we'll just go ahead and rotate it here in the level it's not that big of a deal. And I am going to raise this up hit the end key to slap it on down to the ground and I've placed this close to My missed skill pickup in order to make this easy to test. Now if I jump in and play right now, and I collect my white Miss skill here, and then I set this, and then I transform into this, you're going to notice a problem here we go, boom, I can no longer progress. What just happened there? Well, the problem that currently exists is in our BP Miss gate, with our interact collider selected, or in the Details panel, we've got some collision settings here.

And right now, this collision setting is set to block anything labeled as missed. And remember, our BP player becomes the object type of Miss when they transform into Miss. So to fix this, all we need to do is check this box for ignore the missed and Compile and Save. And we should be able to pass through that now let's jump in and play once again and run that test one more time. Transforming the Miss. And also not only try to pass through this invisible box but also pass through the gate as well.

So here we go transformed and Miss got through that volume and was able to pass through the gate. And now as a human as a pawn, I can no longer passes through it. So that is good to go. Okay, next order of business, we need to find our widgets w BP notify double click on that guy to open it up because we want to work on creating our animation for that need missed to pass message. So once you double click and open that up, remember what this message is vaguely going to look like something like this. However, when we want this message to appear, we do not want the B button to be there.

So what we're going to do is take a little bit of a shortcut to do this. Come under your animations and we've got this intro animate That currently is going to do this. Now, our button interact right here our button, that B button is automatically by default set to have a color and opacity, the a value, the alpha value that is set to zero, mainly meaning it is transparent, you can't see it at all. So all we need to do to create an appropriate animation for this is right click on our existing one. let's duplicate this name it intro underscore, no button. Then let's select this animation.

And let's just delete out this button interact track. We can delete that out. And now if I play this, you can see this is what it's roughly going to look like. Okay. Alright, so that's the easy part. Now we got to go back into Well, let's make sure we save this.

Let's go back into our bp miscut Start to do a little scripting. So find your way on over to the Event Graph here. A few nodes in here that we don't need. Let's delete these out. Let's select our interact Collider. And then let's right click on this, add an event and let's do an on component begin overlap.

Now what we want to do is drag out of our other actor here and do a cast to the BP player. Make sure that it is the BP player that is overlapping that interact Collider. And then what I want to do is find a reference to our player and you should be able to find this under your interactive object variables. And again, if you don't see this category, if you check on show inherited variables that will make these visible. So dragging a reference to our player. We're going to get our player I'm going to drag out of here and say is using Miss we're gonna get easy using Miss I'm gonna plug this into a branch node.

And the reason I'm doing this is we only want to display something here. If we are not in Miss form, we don't want it to show that message needs Miss to pass if you're already missed. Okay, so next I want to bring in our w BP notifier. Here this again, this is a reference that we created earlier for our notification that we, this notifier right over here, W BP notify. So jumping back to our BP Miss gate, let's drag and drop this into our graph. Let's get that.

And we're going to drag off of this and type in received, set received message inside of our w BP notify if I go over to the graph, we have Have this variable for receive message. So this is where we are going to set what we want that to be jumping back to BP Miss gate, again link this off of the false of that branch. And what do we want that message to read? Well, we just plugged that into our interact message variable right here, the need Miss to pass, I'm just gonna drag and drop this on top of this center, like so. woopsie Okay, I'm flipping over my page, oh notes. The next thing I want to do here is drag off of my w BP notifier.

And I want to say Add to Viewport, of course, we want to show that notification on the viewport that's gonna instruct us to do it is going to instruct it to do so. And then I'm going to drag out here and get a reference to my intro, no button the animation that we just created. And then we can drag off of this animation and simply say play animation. And then one more thing to do here to add a little bit of jazz, let's drag off of this and say place sound 2d. And I'm going to expand this out to bring on a few more options here. The sound that I want to slot in is our FX can interact, we can drag and drop that on top of our sound.

And I'm going to set the volume multiplier here to be five. That's going to make that quite a bit louder. Okay, so that should be looking pretty good. So let me just drag marquee selection around all this. Tap that C key and we'll call this our show message script. Let's quickly Compile and Save that just as a sanity check to make sure we don't have any errors yet compile.

And we do have an error. That's why we compile is because I did not set a target. And our target here should be our w BP notify. So that is why we compile, Compile and Save. Now with that all done, we now need to focus on not showing our message but hiding or rather removing that message. And to get us started on that path.

We're going to be working inside of our BP player. So if you haven't already done so, come under this directory and double click on your BP player to open it up. inside of our BP player, we're going to come under the My Blueprint panel way at the bottom. And we created this Event Dispatcher called toggle w magic ready or w magic ready message A while back, we're going to create another Event Dispatcher Okay, this Event Dispatcher is going to be called remove. Need. Missed message.

Okay. And next step here is we need to come into some area of our, some area of our white magic tab here. Where do we got to go? Here's our Okay, here's our Miss bit of script, find your missed script. And in our missed script where we have this sequence node, off of the ven three pin what we're going to do is drag in our remove need Miss message. Let's call this when you drag it and you release.

You're going to get this little box it says What do you want to do here? We want to call for this Event Dispatcher. Now, why are we doing this? Essentially what we want to do is when our kids dirt is overlapping. This Miss gate here, if they have transformed into Miss while they're inside of here, we want to tell that need Miss message to go away. And when we transform into Miss, which is what this use Miss script is all about.

One of the things we're going to do in addition to all these other things off this sequence node is to call for that removal of the message. Now of course, nothing is happening yet be key, because we need something to be listening out for this message. We need something to be subscribing to this tweet from our BP player. So let's have a let's Compile and Save. This must Compile and Save. And let's jump over to our BP Miss gate to set up that subscription.

Let's go to the Event Graph inside of here and up above we've got this Event Begin Play and parent Begin Play. Let's move this up a little bit because we're going to be building some screens ripped off of this. Between this Event Begin Play and parent Begin Play. Let's just hold down the S key SS and Sam. And then left click to bring in a sequence node, we're going to sneak in a sequence node between these two and make sure you keep these hooked up like this. And I'm going to move this parent Begin Play up out of the way.

Now what I want to do off of this, then one pin is bring in a reference to our player, we're going to get that and then I'm going to drag off of our player. And I'm going to search for that customer that Event Dispatcher that we just created called remove, need missed message and you can see as I start to type it in, I've got several options here. What I want to do is I want to assign remove need Miss message when I do. It brings in two nodes, a bind node and a custom event. Hook in your event one output into this bind And now we are essentially making it so that our BP, or misc aid here is subscribing to this message being sent out from our player. So when we turn into missed here, this is going to then receive this message and do something.

What do we want it to do? Well, we wanted to call another custom event that I am just about to create. Find some space underneath our show message. And right about here, let's right click, create a new custom event. Add new custom event. And we're gonna call this custom event.

Remove, I'll capitalize this remove message. Okay, and now with this Custom Event created, I can finish off what we were doing here by listening out for this event, to patcher so once we receive that message, we're going to call for that remove message, custom event to happen. Okay? And let me just drag out a marquee selection around this left click and drag, tap the C key and I'll call this subscribe to remove, need missed message, enter. Alright, let's come back down below where we have this custom event. This is going to be one of two things that is going to call for that removal of the message.

The other thing that is going to remove that message is if we select our interact collider here, and I right click and we add an event for on component and overlap, we want that message to go away and not only when we transform into mist and we're inside of that interact collider but also when we're not even overlapping that interact collateral anymore. So let's drag off of the other actor pin from here and do a search for our BP underscore player to cast to it. And then once we've got that, let's bring in our w BP notifier. Drag that in. Let's drag off of this. And we're going to play animation.

That's going to be our target which animation, let's drag off of our web notifier. Once more, our intro no button, plug this into the animation. And we want this play mode to not be forward but reverse this is going to reverse that animation in the W BP notify to go away. Let's make sure we have a hook in this wire is well to ensure that that's going to actually happen and this remove message is also going to Plug down into this play animation. So again, there's gonna be two things that are gonna be able to remove that message from the screen. One more, some more stuff we want to do here off of our intro no button is I want to drag off of this, whoops, he that's a long line there, let's drag off of this type in get end time.

That's gonna give us the end time of this animation. I'm gonna drag this over here, bring it a little reroute node, like so. And I'm going to drag off of this play animation and bring in a delay node. And the reason I wanted to get our in time here is because I wanted this end time to serve as the duration for our delay. And why do I want to delay here because let me bring in my web notifier one more time. We're gonna get that because we want to drag off of this and we eventually want to tell this to remove from parents.

So essentially we're saying hey, when we're not overlapping this or when we have turned into Miss, we want to play that intro no button notification backwards. And once that time has expired it is completely off the screen, we are going to remove that w BP notifier all together. With that. Let's go ahead and left click and drag around this tab, sneaky hide. We want to call this hide message and we'll just call it hide message. Okay, let's Compile and Save.

Give this a quick play. And let's collect our missed quickly. All right, there is our need Miss to pass message there it goes away. That's our first test. Now while I'm in this Well first, let me a slot in My Miss message or missed white magic here. So now I'm in this volume showing you that when I turn into miss this should disappear, goes away.

And now it comes back, goes away, come back goes away comes back. Alright guys, we will escape from here and guys, that is gonna do it all for this one. If we have any more bonus videos to add to this, I will certainly do so in the future. Otherwise, please let me know what you think of the course. And if you would like to kind of continue on this project, please let me know because there's a whole lot more we could do in terms of creating interactive objects and whatnot in the future love these Metroidvania style games. Thank you all.

See you next time.

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.