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
€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 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.