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
€93.84
List Price:  €131.38
You save:  €37.54
£80.95
List Price:  £113.34
You save:  £32.38
CA$137.04
List Price:  CA$191.86
You save:  CA$54.82
A$154.99
List Price:  A$216.99
You save:  A$62
S$136.27
List Price:  S$190.79
You save:  S$54.51
HK$783.50
List Price:  HK$1,096.94
You save:  HK$313.43
CHF 91.19
List Price:  CHF 127.67
You save:  CHF 36.48
NOK kr1,101.37
List Price:  NOK kr1,541.96
You save:  NOK kr440.59
DKK kr700.13
List Price:  DKK kr980.21
You save:  DKK kr280.08
NZ$169.21
List Price:  NZ$236.90
You save:  NZ$67.69
د.إ367.23
List Price:  د.إ514.14
You save:  د.إ146.90
৳10,965.37
List Price:  ৳15,351.96
You save:  ৳4,386.58
₹8,334.23
List Price:  ₹11,668.26
You save:  ₹3,334.02
RM477.95
List Price:  RM669.15
You save:  RM191.20
₦125,683.43
List Price:  ₦175,961.83
You save:  ₦50,278.40
₨27,806
List Price:  ₨38,929.52
You save:  ₨11,123.51
฿3,703.32
List Price:  ฿5,184.80
You save:  ฿1,481.48
₺3,259.92
List Price:  ₺4,564.01
You save:  ₺1,304.09
B$516.59
List Price:  B$723.25
You save:  B$206.66
R1,923.67
List Price:  R2,693.22
You save:  R769.54
Лв183.31
List Price:  Лв256.64
You save:  Лв73.33
₩137,775.97
List Price:  ₩192,891.88
You save:  ₩55,115.90
₪378.18
List Price:  ₪529.46
You save:  ₪151.28
₱5,754.62
List Price:  ₱8,056.70
You save:  ₱2,302.07
¥15,478.45
List Price:  ¥21,670.45
You save:  ¥6,192
MX$1,711.89
List Price:  MX$2,396.72
You save:  MX$684.82
QR364.36
List Price:  QR510.13
You save:  QR145.76
P1,383.88
List Price:  P1,937.49
You save:  P553.61
KSh13,448.65
List Price:  KSh18,828.65
You save:  KSh5,380
E£4,807.48
List Price:  E£6,730.67
You save:  E£1,923.18
ብር5,687.89
List Price:  ብር7,963.28
You save:  ብር2,275.38
Kz83,485.81
List Price:  Kz116,883.48
You save:  Kz33,397.66
CLP$95,253.47
List Price:  CLP$133,358.67
You save:  CLP$38,105.20
CN¥724.60
List Price:  CN¥1,014.47
You save:  CN¥289.87
RD$5,894.01
List Price:  RD$8,251.85
You save:  RD$2,357.84
DA13,445.45
List Price:  DA18,824.17
You save:  DA5,378.72
FJ$227.71
List Price:  FJ$318.80
You save:  FJ$91.09
Q777.29
List Price:  Q1,088.24
You save:  Q310.94
GY$20,903.54
List Price:  GY$29,265.80
You save:  GY$8,362.25
ISK kr14,104.58
List Price:  ISK kr19,746.98
You save:  ISK kr5,642.40
DH1,013.18
List Price:  DH1,418.50
You save:  DH405.31
L1,782.83
List Price:  L2,496.04
You save:  L713.20
ден5,776.11
List Price:  ден8,086.79
You save:  ден2,310.67
MOP$806.39
List Price:  MOP$1,128.98
You save:  MOP$322.58
N$1,907.39
List Price:  N$2,670.43
You save:  N$763.03
C$3,677.32
List Price:  C$5,148.40
You save:  C$1,471.07
रु13,326.11
List Price:  रु18,657.10
You save:  रु5,330.98
S/368.16
List Price:  S/515.44
You save:  S/147.28
K379.71
List Price:  K531.61
You save:  K151.90
SAR375.04
List Price:  SAR525.07
You save:  SAR150.03
ZK2,580.25
List Price:  ZK3,612.45
You save:  ZK1,032.20
L466.96
List Price:  L653.76
You save:  L186.80
Kč2,370.96
List Price:  Kč3,319.44
You save:  Kč948.48
Ft36,978.60
List Price:  Ft51,771.52
You save:  Ft14,792.91
SEK kr1,088.71
List Price:  SEK kr1,524.24
You save:  SEK kr435.53
ARS$87,217.91
List Price:  ARS$122,108.57
You save:  ARS$34,890.65
Bs692.87
List Price:  Bs970.05
You save:  Bs277.17
COP$390,680.46
List Price:  COP$546,968.27
You save:  COP$156,287.81
₡50,009.58
List Price:  ₡70,015.41
You save:  ₡20,005.83
L2,466.51
List Price:  L3,453.22
You save:  L986.70
₲740,348.57
List Price:  ₲1,036,517.61
You save:  ₲296,169.04
$U3,852.35
List Price:  $U5,393.45
You save:  $U1,541.09
zł405.43
List Price:  zł567.62
You save:  zł162.18
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.