GameMaker Studio 2: Complete Platformer Tutorial (Part 4: Enemies, Hitflash etc)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everybody welcome back and welcome to everyone's favorite time of every other week it's time to carry on with our platformer serious is part number four gonna be looking and now that we've got a gun we're going to be shooting some stuff and causing some senseless murder everybody's favorite tutorial topic just want to point out I might sound a bit weird croaky and drive throughout this video I've got a bit of a cold which I'm certain is entirely my girlfriend's fault so I just want to apologize ahead of time in case my voice sounds kind of weird okay but let's get started anyway it's the first thing I'm going to do before anything else actually is something you always kind of want to do early in my opinion and let's find some object that's generally always browned in your game so I'm just going to go with the player for this one you might just bad things to put it in but um I'm just going to go with the player and we're just kind of have the key pressed letters our event okay just so that whenever the whenever the play presses the R key assuming assuming the the player object or an instance the player object is in the room I'm just going to restart the game so I'm going to type game underscore restart okay just one very short line of code will just Restall the whole game just as a quick way it's not a permanent thing this is just in there just to help us test things out so when we run the game we can just tap R whatever we want and just restart it'll just make things easier to show you guys going forward one thing you guys might notice is that I've already added a few new sprites right away giclee enough I've added they're just duplicates of our original player sprite but with the t-shirt red because enemies we're rad right literally just duplicated everything we already had on same origins and everything but I've also got this enemy dead sprite as a new on it's very similar to our airborne sprite in those gas prices moving up and a sprite for moving down like Splinter two frames like that and this is how I set this one Obara June 21 4e the collision mask kind of like this specifically based around the fact one just so it can kind of fit into small spaces and just a little I cleanly on the floor on just showing you that in case you're following on using my exact assets so you can use the same settings and I'm using all of those assets again we'll just be in the description so any new ones you haven't got before you can get them from the description of this video so now I've got these frightened what do I want to do now I want to create an object for the enemy right just in the same way we create onto the player the way I'm going to do is the simplest way to kind of create an enemy of the platform environment just sort of behave same kind of physics and stuff we've already set up for a player is I'm not going to go through all the counter like you know at walk lap right give them stuff again because I've done it once I've got it in the player so I'm just going to right-click the player and hit duplicate then you know a copy of them rename him Oh enemy a quick way to rename anything in here you just like to impress f2 renamed thing comes up but you can right-click it rename shows you the show because I'll double click this and swap the sprites to s enemy and the collision mask also to s enemy ok and then what I'm going to do is I'm going to cut out some of the stuff that we don't want so we don't want this key press our thing that we just put in on the enemy would really make a difference but um let's get rid of letter just clean that up though if we don't know where step event so we don't we want this guy to behave like in the same way as I'll player but not take inputs from the player okay so we can pretty much deal with that just by cutting out everything from where we wrote get player input here all the way down to just before of VST here okay so you just cut all that out we also want this BSP thing in here still because that deals with like gravity and move them the other thing we want to cut out is this section here that deals with pressing jump key because obviously we don't want to control our enemies of a drum key right so let's get rid of that as well so now what we've basically got here is like a dummy right the dummy objects that will just sort of like has all the physics and stuff that you've got no way to control them and actually move them around yet which we'll put in ourselves later the other thing we want to clean up while we're in here as well as any references to the original player sprites because you know we deal with our animation of the bomb previous one we got X play array as player s play our I think these are the only instances of this but if you want to be absolutely sure you can press control s and just type up play and just go through each one you can also just quickly do a replace all probably on the word player I'm just going to type it in manually just so make sure we can each we can clearly see the three that you want to make sure you've replaced I've named these sprites exactly in the same way as I named a player one so as the enemy s enemy a four-run enemy a for jumpin an enemy D for dead obviously there isn't dead player one but we'll use that later so make sure we've got enemy a enemy an enemy are in the right place or however you've personally named those now let's just quickly put a couple of into our game room I load up the game room I'm also just going to clean up quickly on these walls because having this many big pits the stuff is going to make things a bit of a pain for later so I'm just going to just kind of flatten the flames gave out a little bit maybe add a few little platforms and stuff that we can stick some leaves on as well but I'm just going to now okay I'm going to create a new layer as well we could put it just under the player I guess probably more important to the player of the top of the enemy and vice versa so I'm going to drag some enemies into the room and replace on that height as well so that when I run the game you can see gravity and collision all still working because they basically are the player right um but they just don't have any input now really it's just like the player homely I suppose - the gun as well without any input so progress are that restyle bow analyzer to clearly see that as well the more this sort of behaving with gravity and stuff just as I play it as they just don't have anything that cause them to move around or anything yet so the next thing we're going to look at is bullet collision okay so we've got these those who initially they just go through these guys went on though and have any interaction with the enemies um so we're going to change that the first thing I'm going to do as part of that though is going to the enemy object okay so I just opened up the enemy object and it's create event I'm just going to add some new variables that we're going to use in the ladder HP which I'm going to set it equal for why not just so we're going to make us so four hits will kill the enemy I guess as a reasonable amount you said to whatever you like and I'm going to add the with flash as well I'm gonna set a equals zero what that's going to do is it's going to basically be used as like a frame counter um that we used to determine how many frames to flash the sprite a white color when we when were hit by a bullet okay so that's all the variables when you setup that now we can come to our bullet object okay which at the moment just has a thing where it collides to the wall and destroys itself rather than doing this to begin step um like we did for the wall I'm just going to do this one as a regular collision event so I'm going to add an event to the the below object collision with Oh enemy okay because we do doesn't begin step of the chance that we might see the bullet kind of half passing through the enemy before sort of a disappearing whereas I think at this time it makes more sense to have the bullet sort of near near the enemy and then disappear and then the enemy flashes of white is a good general visual a visual indicator okay so in this collision event between the bullet and the enemy I'm going to type is with so remember the width statement allows us to do code from one instance in this case the bullet instance that applies to a different instance or a different object a group of objects in this case on their type closer into this pair bracket what that does is the the other key word can mean a few different things depending on when and how it's used when it's used in the I might have already covered it when used inside of a with statement I'm not sure where it means basically the the thing that called the web statement but we're not inside the with statement itself yet we're just calling it when when you use other inside of a collision event which is what we're doing now what other does is it returns the instance ID of the thing we're colliding with okay so in this case our bullet is colliding with the enemy and so by doing with other and doing some code in here this code won't apply to the bullet it will apply to the specific enemy that we hit okay I couldn't type just Oh enemy because I would apply to every single enemy okay instead I have to type those up which will return the ID of that specific enemy that we happen to have hit and the which triggered this particular event okay and then in here what I'm going to do is I'm going to type HP equals HP minus one okay in fact I'll show you a quicker way of doing this exact line I usually write these this way in tutorials just to be clear but a much faster way if you're just reducing or adding one is you can type plus plus in order to add one to a variable or - - in order to subtract one variable okay it doesn't count like ilight you can't do like - no no no no but uh - - will subtract one from that particular variable okay and I'm also going to set flash k equal three okay so I'm just manipulating those two variables I just set up in the enemy object the only other thing I want to do is then of course destroy the bullet otherwise this would apply every single frame the bullets colliding and also the bullet would never go away which we all want to take instance destroy outside of that with statement so that it destroys the bullet not the enemy with alignment okay so we can take a look at what we've kind of got going on here already this long is too exciting because you know in a shoe the enemies the bullets do go away when they collide and those numbers are changing as well we are reducing HP and we are saying flash the variable but those variables don't do anything by themselves yet so like this guy who I've just shot like million highs will have HP - fifty something by now right but it doesn't mean anything yet so before we change anything to do with like HP equaling zero and destroying the object or anything like that we're going to kind of make the effect of hitting the enemies look a bit better so then when the bullets just go into the enemy and they just sort of disappear it's not all too clear whether or not you hear an enemy or maybe you hit the wall that is the or something if you shot that so we want to make it very clear when you hit the enemy and that's all this flash variable is coming into here for now what we're going to do first of all is we're actually going to create a shader so then right-clicking shaders and hit create now don't panic okay shaders are a very very complex subject and I'm not really going to be explaining them in a lot of depth in this video I have other videos that sort of touch on the subject I've not really gone into a normal detail yet it's kind of cool SSH white with a capital W but all what I'm going to do is basically explain the basics um well I'm not really even going to splain much of the basics of our shaders all you need to know is that a shader changes the way the game maker draws things to the screen and then okay has a way of drawing things regularly which is actually what a default shader contains when you make one so you can see there's already a bunch of stuff in the shader it's not ng/ml in a slightly different programming language specifically for writing shaders or programs that run on your graphics card but if we were to apply this shader to any of our any of our instances or anything like that they would draw exactly the same way that i drawing now nothing would actually change because this is just a default shader now what we're going to do is use this shader SH on disk or what not in this or so just sh white what we're going to do is use this shader to draw a sprite entirely white okay so like we're going to keep the same shape of the the sprite but like be our enemy really but we're just going to draw a completely white all this blank could be white or the brown will be white just going to basically ignore the color that we're passing through from the sprite to the graphics card but take into account the alpha or the transparency okay so it'll still draw the silhouette the sprite that it will just draw it all in white so how do we do I look at me this is just a one line shader I'm not really going to explain exactly everything about how it works because shaders others say they're a bit complicated probably not really ready to dive into them at first yet but hopefully this will give you a bit of an understand of what they do and what you can use them for so later on you can do your own research and maybe learn how to use shader than more complex interesting ways okay so all you do is come into the shaders you just made Sh white okay and you'll see this two tabs at the top here one called don't and vsh a new one called FSH you can see the top there called vertex and fragment shader completely ignore the vertex one okay this isn't you know need any hang in here in one of the fragment shader which basically determines how we draw every single pixel okay making sure specific pixel of the texture how do we want to draw and we can affect the color and the position of a pixel and also the fun stuff but all we're going to do is this is our default way of drawing right so this is like copied the color of the pixel that we're going to draw all lists of this nonsense here all this is doing is passing the color of a given pixel and the sprite and passing it through to be drawn so what we're going to do is manipulate that take away all the other color just set all the colors to maximum which will give us a white color other than the Alpha other than the transparency okay so don't worry too much if you don't understand this line but as I said I've just said what it goes which is I'm just going to take I'm going to maximize our red Channel or green Channel and a blue channel giving us 255 255 255 red green blue and you pull all those together on a monitor that gives you a white pixel okay so that's already and by creating those X for Open bracket 1.0 1.0 1.0 okay so that's all red green blue okay and then off fourth part this is the vector for is the alpha or the transparency which we just want to keep the same then it's already been set in here so I'm just going to copy that GL drag color dot a okay and that returns the alpha part of this pixel color again now let me show you how to actually use this shader if I just go into our enemy object I'm going to add the draw event okay so I don't think we've used to draw event yet the draw event determines how and I'll get essentially torn or rendered to the screen okay how any instance is drawn a very much like shaders that has its own way of doing things by default and if you don't have a draw event the enemy of the instance we'll just draw itself normally based on any position I and all the stuff that you've given it but if you create your own drawer then it ignores that okay ignores everything and replaces it with whatever you put in here so if I just change this to like draw text and start drawing some text and stuff on the screen it would draw the text but it wouldn't draw any minimal but we still want to draw around me so I'm gonna type a line called draw underscore self so this here this line is what you usually get to run so by playing the draw event and putting draw self inner you've replaced the default draw step with the exact same thing okay this is what the driver would normally do if you didn't have a drawer event okay just draws itself with its given angle its given position is given transparency and so on so forth but now we can do things in an aroma and manipulators such as SAP a shader that's what I'm going to do with shader and the score set okay we're just going to turn on a given shader which changes the way we're currently drawn to the screen with trader we're going to use this Sh white and then we're going to draw the sprite now that the shader has been set and afterwards another type shader reset which just sets us back to our default way of drawing if we left it on everything on the screen would be white we would want that so if I run the game now we should notice that all the enemies just turn into white silhouette like that they still behave in the same way from everything but they all complete white silhouettes because all that color is being ignored I'm just being set to one but their alpha is being kept the same so we still get the outline of the sprite okay but we don't want them white all the time okay so how do we make it so they're only white some of the time well what we're going to do is go get into all that white copy over the top of the enemy when we should be flashing we already know when we should be flashing because when the bullet hits is we go to a bullet a collision event it sets flash to three very specific number but you'll see why it's three rather and say one or true in a moment okay and by default flash is zero so what we're going to do is first of all at the top here I'm just going to add another to result okay this is going to be our basic just drawing off the sprite okay no shade of sour anything so we'll just draw the sprite just as it is okay just this little dude with this red top and we're going to leave that alone when you do anything to let then underneath we're going to type if flash greater than zero okay which we know is true if we've been hit by a bullet then I'm going to do this stuff again where we draw the sprite again so if you're a second time meaning it will draw over the top of our original sprite okay because if you think about how we do in order if you were if you drew something on a piece of paper and then you drew something again later you would draw that over the top of the original thing right that's what we're doing here so we've got the shade of saying as we do here so the problem is now the when you're hit by a bullet your Flash gets set to three but it never goes back to zero so all we need to do is if flash is over zero subtract one from it every frame or every time we come through this event which is once every frame the draw event just like the step event happens once every frame because it happens every time the instance is actually drawn okay so by just doing - - here which again is subtracting one flash reduces from three to two to one and then to zero meaning that this will happen three times every single time we get a hit so for three frames our enemy should flash white and then return to normal when it by a bullet so let's see if that works how we want it to know yeah so you can see the bullet hanging dudes now aintry make some kind of flash a white color so you may have noticed our enemies don't actually they don't move around or do anything particularly super interesting out that it's still just dummies and I'm going to leave them that way for now just cuz it makes it easier for us to test the stuff and kind of get the visuals and everything on our enemy working properly first the actual moving around of the enemy is actually really straightforward so we'll kind of just do that probably as our last thing and then for now it just makes it easier for is going forward if they just stay still the next thing we're actually going to do is look at creating their permanent it will give them a little dead body that appears when they get destroyed and actually make it so they can be destroying the but not invincible as they are now they've got five hit points for high point rather and they take damage and it just goes under zero and then just keeps going negative forever so we'll change that but before we do that specific thing we're just going to create the actual dead body itself first in order to do that what I'm going to do is go into our enemy I'll get down chilly and remember just close to is I'm going to copy from the gravity line here via speakers vs people's graph does it'll do like gravity all the way down to the bottom of the collision I'm just going to copy this this is a very useful chunk of code here it's almost worth putting it into a script that we change bits of this around enough but on between objects that we probably don't want to do that but this is very useful because this is just our basic collision thing that is useful just to have and we're going to use that in our dead person object okay so I'm going to what we're gonna do is we're going to create an object that acts as the corpse for the enemy we're going to kind of like cook it with a bit of physics and then stop doing the physics once we like land on the floor and we don't have to anymore okay just to save this processing time so right-clicking objects now after copying again this chunk of code from BS People vs people's grab all the way down to y equals y plus BST okay so gravity horizontal collision and vehicle collision right-click and objects hit create get call this old dead okay set the sprite to be F enemy D and then add the stamp of that and just paste that in okay now obviously this chunk of code is working with some variables that don't yet exist and those objects were only copied the staff event so let's have the create event as well and just add HSP and we're going to actually give these some default values so your equals three VFP can equal minus four and drove out gravity able to keep that the same as everything else just so it looks kind of consistent right I'm also going to add done equals zero and you'll find out what we use that for in there but you'll notice instead of saying via HSP to zero and vsb to zero just to declare them I've given them default values on the off from the offset so that when we create this this dead thing for the first time one is the MA it's already moving and you'll just saw like minus four so we'll go up a bit and the HSB is three so we'll go to a left a bit and create kind of like an arc and then the gravity will pull it down so it kind of like does a little alcaman lens okay which is kind of what we want the other thing to do in here is also add image speed equals zero because we want to control the sprite of this defray m-- directly because the the enemy dead sprite is two frames as the going up and fall it well actually now I'm not really even going up and coming down it's in the air and then on the floor okay so once we're on the floor we just use that one okay pretty straight boy so by let's come back through oded now it's scrolling through the workspace so we're saying image b20 our default image index will be zero it won't animate so we'll just stay on this bright and then we can just set it to the other sprite when we need to just by saying image and X equal one okay you won't do that just yet so come back to our step event now and what I want you do is just wrap this entire section in a case statement there's going to be F done in cost equals one okay open squiggle racket and then put another scoop of the back up right at the bottom okay I'm going to select everything in between and just press tab just to kind of give us our same indentation that we kind of use for everything else up to you if you do that but I would advise it so what that's going to mean is oh sorry it shouldn't be if done equals equals one should be if it's equal equals zero sorry about that so basically what this means is good by saying done for zero here and create it'll start off doing all of this collision stuff and then once we've once the body hits the ground okay we don't need to do that anymore um so in our vertical collision here if we find a collision where we're about to go we can type F vsp greater than zero so if we're moving down I done equals one okay so if we found a vertical collision and we're moving down because we're moving our higher the local speed at zero or gravity will see to that and set down to one and then once that once that's done it'll still do all this then once it finishes that particular loop of this step event it'll never do any of this again that goes done will be one new on the zero and we'll have no way to get back to zero so we skip all of this so we don't have to do any collision checks just constantly over and over gifts you know collision tanks can be slow so that stops us having to do them once the object is done doing it's it's a little movement at the start okay the other thing I'm going to do actually is I'm going to move okay here this is probably the best place to do it instead of putting on one line and they're open squiggly brackets just like that and under done equals one I could only just set this outside of the spice and gets cleaner just to do it in here so we may set a one image and score index take a cool one and that'll set to the sprite that we actually want to use which the other dead sprite on the floor okay so we can probably test this now I mean we've created as object we don't actually have any way of Korea dynamically creating the dead object yet like these enemies they still don't have a way to die so what I'm going to do is I'm just going to delete a handful of bun and just replace them with our dead object just so we can see it working the bat I run that now yeah so anyway just hit restart and to you that's what's going to get created when you see like if a guy was shot here somehow floating in the air your turn listen they just found a four they go up a little first and then they fall and kind of learned like that okay so let's actually make it so that our enemies can be killed okay so let's go into our enemy object add the begin step event the reason I'm going to do in the beginning step event I'm not sure if this is clean it away - stroke - this really lots of different step begins that stuff that it works for what we want to achieve so in the beginning step what I'm going to do is I'm going to say if HP is less than or equal to zero okay so similar less than or equal to so if it's zero or if it's less than zero do the following which is we're going to kill the enemy right how do we do that well first of all we can just do the bulb just do straight up instance destroy which is going to get rid of our enemy object but at the same time we're going to do instance underscore create underscore layer okay open bracket this allows us to create a new instance dynamically just as we did with our bullets create I'm going to put them yeah I'm going to leave them on the same layer as the enemy for now so X Y the layer issues can be layer so you know just leave them on the same layer and call them Oh dead okay that's the instance that we want to make that's the object that we want to make instances of rather okay so now when I hit P which is 0 these enemy should turn into these dead bodies so let's place some enemies back into the room now just so we can kind of see if this works so here I am let's shoot some these yeah flash few times and then they turn into good little dead bodies you'll notice though they all fall to the right which looks fine when I'm shooing them from the right but if I come to our last week's go now see them they kind of fall towards you which you know I can look fine as well but the problem is when they all consistently fall like that it's pretty noticeable work you start doing things you know every single enemy always always fall to the right and well which how you shoot them from we're going to manipulate it and we're going to make it so that instead of just having that fixed HSP equals 4 and VSP goes minus 3 to start we kind of change that based on the direction that you will last hit from by a bullet okay okay so let's close this now come back for workspace let's go to our Oded object again a little too creative and I'm just going to reset these back to zero okay even though that was giving us our speed to begin with we're going to set up speed a bit differently instead but we still need to declare those variables so we make sure you still leave those lines in just send them to zero okay we're going to add a new variable to our enemy or go get your enemy object go to the create event and it's from okay and just set it at zero for now what we're going to do is use here from to store the direction we were last hit from so every time we get hit by a bullet we'll update this variable to be the direction that we were here did the direction of that bullet okay so whichever direction now below is heading in will become our last hit from direction so now let's go to our bullets object okay and where we collide with the enemy so at the moment we just set HP - - and flash equal three so in here where we're manipulating variables to do with the enemy we're going to change that hit stop variable that we just declared to equal over dot direction now I mean normally I go quite a while ago in the video I said the other when using a collision event returns the other bridge returns the exact instance that you collided with right put inside of a with statement and then done by inside I mean within these curly brackets on the other statement changes to mean the ID of the the instance that called the woods statement so it's kind of doing other other and kind of a way like a double a double other so now that refers back to the bullet okay so we've come full circle so regards we've come full circle and we're going to get the current direction of our bullet object okay although bullet instance and we're going to apply that to the the enemy that we just hit okay so the remembers the last hit that it took that's the wrong variable so it's not hit stop so different confident I'll hit from is the name of that variable let me just check I need that correctly an enemy I did hit home equals area don't go ahead stop go ahead from idea I'll be a silly error okay now we don't know remember the direction but how do we make that direction apply to it when it dies well in order to do that I've come back to our enemy object okay back to the beginning stab where we actually perform the the description of the enemy itself and where we replace it with and where we replace it with a dead rather than Oh enemy okay what I'm going to do is I'm going to manipulate that Oh dead and I can do that by typing with here opening bracket and closing that bracket around our instance create layer line I think we've used this before when we were creating bullet to the gun what this does is basically it's going to return the exact instance ID of that instance of a dead that we've just created and we're going to run some code on the thing that we've just made okay so what we're going to do is even though it's already run it's a create event by the time we've run this line and it's set like direction and HSP in and all that stuff to zero and once it's apply that we're going to overwrite some less stuff based on based on the directions that we want to use okay so in the type Direction equals sugar dot hip wrong okay so again calling other within the would statement refers back to this instance okay so the enemies hit from is going to apply to the direction of our Oh dead instances being made right but how does that help us well what we can do is we can set our HSB and VSD to equal a speed based on that direction using length / x and length or Y if you remember my explanation of those functions from the previous parts on the type of HS because length the X and the Thalia these were useful and then we give it a length and a direction okay and we're going to say like three pixels on in the direction that we just so so commerce direction that we just set okay so if we were hit from like the top left or whatever coming down about angle so that was like 270 degrees for a were there we're going to work out how much horizontal speed we would need to move three pixels in that direction on the x axis and then to set that to our HSB then we do the same thing oops copy/paste I'm going to do the same thing with all the course Bates of VSP equals length the Y okay so then we work out how much on the y axis we need to do that exact same movement and we just apply that to that and then I'll give us kind of a movement in that direction but I think it's kind of nice to always kind of give us a bit of an upward upward thrust um when this instance died so to prevent it like being shot from above like a shooting the courts in the ground you might like that I don't know but I'm going to adjust it a bit and add minus two on the end of here you can try it without because it'll look different it might look interesting if you get shot from above then like they just sort of instantly flop rather than like doing the world sort of jump but I like the little jumping death they do so I'm going to always saw subtract two from this so we always have a bit of a bit of upward vertical speed okay then the last thing I'm going to do in here is that image anchor scale that equals sign testy okay so now we have a horizontal speed we know whether or not we're moving toward the right or towards the left or I guess there was an ear all if it was absolutely like spot on zero which you probably want to go does a very rare circumstance that might be a book we'll have to fix later on depending on how often you get hit directly if you got here like yes was perfectly from above horizontal speed mine equals zero suppose what you do is the safety explode you could say like image if sign HSP there's not equal zero and then just stick that on the end of there instead just to make sure that we don't say image exhale to zero otherwise I'd make the bad thing invisible okay in otherwise we would just sort default it or whatever it is which is what facing to the right has standard okay so it would be a very rare circumstance but I suppose it is insanely worth doing that okay and that's the last thing we need to do that so now if I press f5 and runner that should find that we can shoot these and they fall and if I shoot them from the other direction you can see they behave as a programmer actually look from above you'll notice they fall they don't quite fall as high as if I shoot them like from underneath like that extended like right underneath a then they go quite higher so now they're based entirely on the the last bullet that hits them so the bullet that killed and will determine which way that bought their body actually Falls alright so I guess the last thing to do is kind of give these enemies of their movement just so they move around and you know stationary targets are a bit easy right so let's go into our enemy and when we create um where we create the enemy let's just give them some horizontal speed okay so it's give them a horizontal speed of four um we want to fall how fast with the player move again walks be a low well we already have walk speed next we copied it but that's first put it underneath and just set it equal walk speed and we'll have them move a bit slower than the bless' or change warp speed to maltiness or two okay now it will go three now you saw this what everyone I'm going with three okay so what I'll do is we'll just walk to the right now until the hell wall and then that HSP will equal zero but what we can do instead is basically just HSP to equal negative HSB right and that will just slit the direction we moved in this isn't the cleanest what we do this in a slightly coming away which I might show you if you drops it when we kind of explore up making these enemies a bit better but others the fastest way just to show you very quickly how this works so you see now they walk and whenever they hear a wall will just slip and go in the other direction that's they're probably about as basic as you can get for enemy movement right through this function showing is the other animation stuff still works because it's the exact same code we used for the player means therefore animation and everything is on point and that's basically it we don't have any way from under touch the player and kill them or anything yet but we'll probably come to that later on this is probably where I'm going to leave it for this parks I think we've covered quite a lot of stuff so I'll see you guys next time in part five two weeks for the data SCO's lives or not next Friday but the Friday afterwards thank you very much for watching and a huge shout out in particular to my patreon spores a huge shower in particular in particular - in a mule Alex Ray Charles Montgomery damn Angel Rodriguez Harold Guidry Roxxon Steven Hagen Jason McMillan and Owen Morgan thank you very much for your continued support my patreon supporters are currently voting on the topic for my next video which will be next Friday and this platform series as I mentioned will be continuing the Friday androids thanks again for watching I'll see you guys next Friday
Info
Channel: Shaun Spalding
Views: 303,571
Rating: undefined out of 5
Keywords: Game Maker (Video Game Engine), Tutorial, GameMaker Tutorial, GameMaker, Game Development, Indie Games, Tutorial Series, Game Maker Studio, Making Games, How to make games, GameMaker Studio 2, GMS, GMS2
Id: JsVqc2dnftU
Channel Id: undefined
Length: 39min 4sec (2344 seconds)
Published: Fri Aug 04 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.