In this Sprite Sheet tutorial you will learn how to create a shooting animation.
Tags:How to Create a Shooting Animation - Sprite Sheets,adobe software tutorials,adobenicnacs,create a shooting animation,create animations,digital manipulation,sprite,sprite tutorial
Grab video code:
Hello and welcome to this tutorial from dominicask.tk. And if you saw previous tutorial we left off here. We had our clone trooper and move along the screen with his very dodgy looking gun. And in this tutorial we’re going to take step further and we’re going to how to shoot animation.
But before we can do that we need to group this animation together just the walk part. So we’re going to need to add a small little script in. So what we need is if statement. It means to say if costume number is equal to and then the last part the costume number is free. So say if costume number is equal to four take that out there and wanted to switch to costume, costume one. In theory, this shouldn’t do any difference—make any difference for now. When we say it looks exactly the same, in a minute when we add the rest of our animations in it’s going to play in a very important part. So now we need the rest of our animations in and this time I’ve got it pre planned. It’s 01 to 07. So I need 01 fill with transparency and then paint, import, go to, and for transparency and if you seen the previews story you should already notice if you haven’t you should check them out. So I’m going to pause it for the sake of time and when, I’m finished I’ll see you them.
Okay, I finished adding the rest of the costume as you can see, we have a shooting animation going on here. And in the script we need to add—I’m going to follow the space key by the way. When space key is pressed and then when you set up an if statement to check if the animation is already playing. So we’re going to check if current costume number is smaller than five. So if the current costume number is smaller than five it won’t be performed in the animation or it will just be standing still. And if the question number is smaller five and we’re ready to go to form the animation we just say switch to costume four, this is the base costume four. And then we need to cycle for it.
One, two, three, four, five six.[Demonstration]
And I list out the transparency on that one which is very stupid of me, its much better. Six, so we need to go to repeat six times, wait 0.03 and next costume, and after that switch back to costume four and then this should hopefully or maybe not and there you go. It fires, the only reason it wasn’t firing then it was rather stuck costume five. Now it fires and I can’t keep pressing it. I can keep pressing it but I can’t fire twice during the animation. And the next step would be to add a laser coming out of there, which will be quite easy to do but I’m just going to pause it and check out how much time we got left. And see if I can do it now. Okay, I have more time than I suspected. It’s only four gone four minutes I think so we got time too try the laser animation. So what we’ll do is we’ll paint a new sprite. Now, I think some of them, there is a laser sprite that comes with it, but for time sake, I’m just going to draw out my own instead of using that one.
And here’s our laser, I will just name it laser and what we want it to do is when the green flag is clicked we want it to hide so you don’t want it visible. And then when the space bar is pressed, we want it the first go to clone and if it goes to the clone see when we press the space bar it goes there, which is isn’t quite right. So we need to change the y and if I change it by 10 you can see it goes up, so if you change it by 10 and you change x by 10 that gets in to almost perfect positioning and it will do for us. So if we use the space it will always go there. And even if we move our clone forward so if I move it over here, we can fire. And you can see we have glitch here that we will fix in the next tutorial. We fire then we run and it fires again. So we will fix that in our next tutorial. As you can see we fire and it’s not showing yet so we need to put show so come over here and it’s not showing.
Oh I know why, because it depends on which way it’s pointing. So this can be fixed very, very simply you will say if direction of clone is greater than -1 so that will include 0 all the way for to 180 which we won’t. So that is when it’s pointing, let me just check left and when we do it but otherwise we wanted to do this. So we need is to just duplicate this and if I can change this to minus numbers and it should work. There we go, so have that and see it goes to that exactly, but once its fired, once it has gone to where we wanted to then we needed to fire so I can just say repeat until and then we can say touching edge move 10 steps and then we can just hide it.
And a sprite can move it can fire at will if it points the right way. So if it should be pointing right and this should be pointing left. So hopefully, now we can fire. Okay on the next tutorial we’ll fix this glitch and we’ll carry on I think animation and sprite. Let’s jump animations etc.
Okay thanks for watching, please check out my site that’s www.dominicask.tk and if you liked it please comment, rate and subscribe to my videos. Thanks for watching.