Back Dash - Script #3

5 minutes
Share the link to this page
Copied
  Completed
In this video, we'll fix up a few bugs with our Back Dash particle system.

Transcript

Okay, so for starters looking at my notes, I did make one mistake here for our spawning the emitter at location. So we've got this back here, I actually need to unhook this one right here we're going to have separate emitters for back dashing to the left into the right, our sound location that can stay the same, we can kind of move this down, but this is going to be our, our back dashing spawn emitter to the left. So let me just right click on this and I'm going to leave a node comment for left and I'm gonna set the Z rotation for this to be negative 90. Let's try negative 90 for that. And then I'm going to copy and paste these three nodes. Actually all we need to copy and paste is our spawn emitter at location Ctrl C. And then Ctrl V down here, I'm gonna have to move all of our back dashing to the right down just a little bit.

And so for back dashing to the right, are then zero is going to plug into this emitter, the location for this is going to be the world location of our capsule component. Going to make sure that you plug this back into the play sound at location like so. We can probably get rid of that reroute node just pipe this directly in and the rotation for this. This one's not going to be back dashing to the left but rather the right. Let's set that z rotation to be 90. Okay, so that's all I updated right here is this part of the script off of our back dashing, right I added an emitter separate for the the right dash right down here.

Okay. Let's Compile and Save one more time and our particles still going to be screwed up. But let's see if we've got the emitter shooting off in the right direction. So collecting our back dash here. Okay, back dash. Ah, that was still obviously wrong.

Okay, so I screwed that up. I'm going to change the Z location here back to be zero for the left and for the right, I'm going to change that to one not negative one weird number like that. Let's go Z of 180. Let's try that again. Why don't I think 90 there that didn't make much sense. Okay, so back dashing left, that particles kind of shooting off in the right direction.

And then back dashing, right, it's kind of shooting off in the appropriate direction now. That's all well and good. Let's figure out what's wrong with our particle. Why keeps pumping out smoke there. Okay, over in our content browser, if you come down into the particles folder, there's our P back dash. And it was this trans square emitter that kept spawning again and again.

So if I click on our required module right here, down in the Details panel here, we've got the duration emitter loops, zero, that's not what we want. Zero indicates looping continuously set that to one. How did I screw that up? If I had that one, correct. Let's go ahead and save that. Then let's jump in and test one more time.

Collecting our back dash. Okay, back dashing that direction. Looks good. Looks good. Not too shabby. Of course, the animations not hooked up yet, but that used to come.

Okay, so let's take one more look at this monster script here. I'll try to kind of pause the video certain junctions here, or rather frame it up so you can pause. So that's the beginning of our bags. Okay, off of this is facing right the true branch we've got the sequence. And here is all we're doing for when we are back dashing to the left, back, dash left them out. Make sure you've got back dashes slotted in is the meter here, rotation, zero, back dash sound.

We're doing this delay of point two seconds here at the end and then setting our is back dashing back to false. And then backing this up if our player is facing to the right, if that evaluates to false right there. Then we are doing all this script right here. Try to frame this up as best as I can, guys, it's hard lots of script Okay, And hopefully you've got that all put together. All right, animations are still yet to come, but guys that is gonna do it all for this one. 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.