Construct 2 for Beginners: Create a platformer with 0 coding | Destino Dello | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Construct 2 for Beginners: Create a platformer with 0 coding

teacher avatar Destino Dello

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

22 Lessons (3h 25m)
    • 1. Intro

    • 2. Project setup , background and Platformer ground

    • 3. Player movement, Player animation, Mirror player part 1

    • 4. Player movement, Player animation, Mirror player part 2

    • 5. Add jump through objects

    • 6. Adding more ground and a parallax background

    • 7. Adding Enemies to the game PART 1

    • 8. Adding Enemies to the game PART 2

    • 9. Player collision with enemies and Flash behavior

    • 10. Parallax Layer, Gems, spritefont, Global and instance variable

    • 11. Subtract heart/life if player collision with enemy and collect Gem

    • 12. Player attack, bonus gem and dead animation for enemy Part 1

    • 13. Player attack, bonus gem and dead animation for enemy Part 2

    • 14. Creating Popup window for Gameover state

    • 15. Add Global variable for player heart and a background to the popup window

    • 16. Adding a level completion point, using events group and level completed popup

    • 17. Adding more ground and enemies to the first level

    • 18. Debugging

    • 19. Adding keys, collecting keys and keys HUD

    • 20. Unlocking the door and completing the level

    • 21. Adding touch control and creating an object family part 1

    • 22. Adding touch control and creating an object family part 2

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

This is more than an intro course, we actually build a very decent 2D platformer from scratch.

Learn the concepts, tips and programming techniques to build a mario type platformer game with the popular visual scripting editor, Construct 2. 
By the end of this course, you will know everything that is required to create your own 
amazing browser game and deploy it to the internet.

This course takes a practical approach where you get the opportunity to follow along and understand the basics of 2D game development. 

I don't just read a script and tell you what to do, instead i put myself in your choose and even show you how to spot mistakes and fix them.

It follows a real world scenario of working with the Construct game engine to create a game.

Together we will work on 3 levels and the last one will be your assignment before completing the course.

The game assets are provided to follow along.

Each section is supported with a downloadable source code for the project that allows you to follow along and you also get slides explaining every new concept and a cheat-sheet with all the keyboard shortcuts to be more productive.

If you happen to be stuck feel free to use the forum to ask questions and i will happily provide as much assistance as needed.

This course will be regularly updated based on student suggestion so don't forget to give reviews and help make this a better experience.

So what are you waiting for? Enroll and let's start this journey together.

Meet Your Teacher

Hello, I'm Destino.

See full profile

Class Ratings

Expectations Met?
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Intro: Hello, everyone, and welcome to this awesome and amazing cause on to the game development using construct to with zero coding or previous experience. I know it can be difficult to get started with the new software or just creating a game in general. And it is in that regard that I have credit discourse to help and assist you guys get started creating games. This course is project based, and we dive deep into creating a platform again. I'm confident and challenge you to take this course, and I'm sure that after you will be able to start creating game on your own at the end of the course, there will be a challenge where you actually create an entire level and I will be available for any questions that you might have. We will cover everything and that included a parallax but ground player attack collecting Jim on looking doors, a level selection menu, a game over and level completed pop pop up window and multiple level will also add ODU and some to the game and so many other cool stuff. So sign up right now, and let's create a game together now for the remaining off this intro. I would like to play the d moved the game that will be creating so that you can have a chance toe look at it and see if you like it or not. So right now there's this sound that's enabled. And, uh, as you can see is a particular game. How much are we able to lose life? So school when my enemy, it's me, I can collect keys, no jumper around Kordic gyms and let's see if I can finish this level. Que often looked at, though enough completed the level. So here's a pop up window that appear toe. Tell us that deliver is completed so we can press play on. But this is the second level so I can move around hoops of lost. So that's the game of what we do. So I can try again. Let's see if I can make it this time around. As you can see, it's Ah, pretty challenging game to play, but with time and with my help will be able to recreate this Kim. And from this, I'm sure that you guys will be able to to start creating your own games and that more flavor to it if I'm did one small. So the Okay, So you guys. So this is the game that would be creating there. More levels actually, on this game, if I can try and go out and select play was at level two, as you can see have probably seen their level that are still locked, so we need to finish this level to unlock the next one. So that's what's cool about this game, and we'll be able to create everything from scratch. So see, you guys are in the course and hope that you will enjoy it. 2. Project setup , background and Platformer ground: Hello, guys, and welcome to the section. We'll start off by creating a new project. For Click on this, construct a button, select new and double click on new Empty project. Here's our view port, So let's zoom out by your likely pressing control and minus. Then we can pin around by pressing of space key and moving our mouth so right to its Izumi . Actually, let's zoom out. Let's start by searching are into size, so let's reset it toe 11 36 on the width to 6 40 Okay, now you you have probably seen the change off a window. Sighs. Let's go and do the same thing For layout, say so. Lets it make sure to select layout and ah, the outsides. Let's change. Actually, we'll keep the width and we'll change the ICT to 6 40 Okay, good. Let's go into our layers window Onda selectively or zero. And then you rename it toe background. So this is going toe a background layer. This background is going to contend all the sprite for background. So let's open our file Explorer food. This is where you save all the assets that you've donated for the course, so good to abstract but former PNG and then good toe tails, then yellow tails. Sorry. So he said, Good background, then select set three background. So let's drag it onto our layer. Here it is. So we wanted to position to be zero by zero now, as you can see because so we sitting back to zero by zero. So zero but zero now, as you can see. Ah, this position is not quite what we're looking for. And that's because the origin off our sprite is in the center. So basically, when we place in Accord in, it is based on this center, and we want to change that to be based on the top left corner writer. So let's go to edit any mission can zoom out. Make sure to select this button idea Set original image point and ah, let's right, click and select Quicker sign, then top left. Okay, now that we have changed our origin, we can go back and re set its position to zero by zero. So that's it. So that zero for X coordinate and zero for the way coordinate. So let's go back and add more items onto our background on notice that this is half sized and yours maybe the full left off the frame. But don't worry like it doesn't really matter. Because if I tried to preview, you can actually see that its full sized. So you don't have to worry about how it's looking. So let's go and add, uh, other images. Select sits treaters. Place it on to the layer. Let's move it. What about this position? Good. You can just follow along by looking at the position sittings on my screen on decides as well. There will be highlighted, Ah, in the properties window. So let's go in a deterred one, which is going to be set three hills. So let's place our hills. It's moving around and here we have it. This is our background Now. We don't want to be moving around any object inadvertently when we are walking on the other layers. So we are going to look this layer now when I try to move any object, I can't. That's because the layer has been locked. If I opened it, I can move, but we don't want that be a view, so let's lock it. Okay, so now that we've done not that we are doing with our background layer, we start working on the ground layer. So let's are the new layer at the top and let's rename it to ground. If a capital G next, we'll add objects onto our grand layer. So let's ah, double click here we have. Ah, it's a new object. So this is toe in certain new object type and we can select from which plugging. So these are all plug ins. So the plug in that will use for new object is going to be tired. Background. So let's place it anywhere on our layout and ah, load an image from file from the file. So let's say like that now to get on this folder. Writer, you just after from this PNG folder through from from this asset folder, just go PNG gentiles. Then we select yellow tails for make sure that you right here and select tell yellow 04 So here, cheese and viola, this is it. Now make sure that you go to view and ah selected these books right here, snapped a great so make sure that it selected and then you place it right here and we change. Ah, it say's consuming so you can have a better look, so we'll change its size. It's a drug it out. So you just select one off these origins. What year? So you can drag it out this way Or from where to from the bottom. Just selecting the corner ritual and then dragged. Thought So this is good. It's reduce it. Okay, let's double click to are they knew plugging and still tell background. Place it. Look for me. Mated and selected. Tell yellow six. Good. So let's close it. Yeah, it is. Then let's reduce it. Okay, So make sure to check the size and the position so we place it right here and we'll drag it out like we did for the 1st 1 Okay, here we have. Ah, back clone and glad ground layer completed. Now this is it for this video. In the next video, we'll be adding a player and herding more ground on toe. Ah, ground layer. So let's go and review it to see what it looked like this for. And ah, here it is. So far, this is what our game is looking like and see in the next video to are the player and more ground shop 3. Player movement, Player animation, Mirror player part 1: So for this video will start by adding, Ah, Julia on. We'll rename it to game with a capital G. So that's again and to make sure that it's elected and this is where we are going to be placing. So basically, this layer right here, game layer, is where is going to contain our prayer. Our enemies are gems, keys and other stuff that have to do if the game like those in checkpoints. So this is where we will be placing our actual game characters. Not that we have the layer set up. We need to add the actual player onto it. Let's open or file Explorer. Okay, Yeah. We go to the playoffs folder and ah, we select Ah, pray or read. So we select we opened pay a red folder. So these are all the sprites and frame for player. So right now we will select play a red stand. So this is going to be a month Sprite. So drag it onto ah, layer. So make sure that the game layer is selected. So here is a little girl right here. No, Isn't this guy handsome is in some, right? Yes. One I two legs no arms. One big square head I was putting on. So now we can save our changes by clicking on this, uh, described here. So we save it, then we can preview it. Okay, so here is our guy. Now we can see that the prayers just a static image. And if you try to press any arrow keys to move him around or aws d is not moving around, So it's just a static image. So in order to fix that and give a prayer motion will add Ah, be a fair to him. So let's go back into construct to let's make sure to select our player, right? Yeah. Actually, we can really mean toe play. Okay, Next we're scroll down. Yes, Or be of your sittings. So select, be of use, and we'll add a newbie view. The behavior that we will add will be part for more. So let's look for it so you can search it right here. So here it is. Oh, you can just go into the movement section and there many be of use for car per funding. Physics direction. Bullet. Ah, well, select ah platform. So let's select up. That's done Now let's preview and see if we can move him around now. Okay, now, as you can see, because of the platform of behavior that we have added can see the player just falling through the layout. And that's because off the platform will be of you. Gravity, as ah is now playing to him because it's now part former. So you need a solid object to lender. And because everything that we have in our background so far, you know on a grand layer at just images is actually falling. Tow them because they're not sold it right. Like imagine if the grand that you are standing on was just a new image who couldn't stand on it. So let's change that so that the ground is now solid and it can stand walk around in jump and land on it. So let's go back to our ground layer, so make sure to select the ground and select this character, and I will add a beauty to it. So plus and select solid for a tribute. So now it's going to have a solid attribute, so it's close that and do the same thing for the green guy be of yours. So OK, so lead be of use. So let's go back and review once more. Okay, Now our guys is standing and is now moving around and jumping. So because we've added ah, the solid behavior to our ground layer objects now is able to stand on it, jump and land on it So as you can see her moving him around using my arrow keys, right? So when ah pressed, the left Iraqi is moving to other left When I pressed the right, our keys moving to other right. And then when I pressed up, our work is jumping. Now if you paid presentation in my notice that our place is not actually standing if his legs but is standing with his head and his legs are still kind off through the background. So I don't know if you can really look at that, but let's go and fix that up. So here we are, back in construct to let's a little pre object on go to edit any mention. So here he's and select set collision polygon. So this is the collision polygon under a reason why he was lending right here on this level is because his collision polygon is set this way. So because we want him his legs also to be part off his ah collision polygon just selected Onda set toe bounding box. Now here it is is looking better, and ah, then we can close this window sieve and go back to preview and see Okay, now he's standing on his legs. I don't know if you can now notice the difference. What? I'd like it better this way. So it's not like it's kind of falling to the ground. You want him to stand on the actual ground, so that's good. Let's go back and continue walking on him now. I don't know if you've no chest. If I go back and preview once more, you can actually see that when our players working is just ending. And the same thing is happening when it's jumping. So we need to change that and that someone emissions when is moving around. So let's go and work on that. So let's go back and right click on all beautiful play a writer on our hands, some player and goto idiot animations. So here we have. This is our own emissions window and this some off our animation sittings. So let's change the name off this first on emission, which is the default, The default one. We'll call it stand. So this is Austin on the mission. We have only one frame for it. So these are the frames window. We have only one from for the standing and emission. Because, of course, there's only one week instant. Next we let the second and emissions or right click, add an emission and call it work. Now, if we select is an emission, you can actually see that the zero frames for this. So we will be adding new friends, right? Click and select import from from file then, Ah, make sure that we in the playoff play a red folder and we will select our friends from year . So let's elect all this. Friends like pre arrayed work one period look to empowered with tree so you can just drag around to selector two of them, then open it. So here there these are three frames. So let me do it this 1st 1 because no need it. Now if we want to preview animation and see what it's looked like because our animation is basically playing these three frames, so if we go back and we preview it, you can see that the trooper, the three firms are playing what they're only playing once. So let's close that and selected to go to the sittings on. We were said to look two years so that it can be looping now. If I tried to preview, you can see that it's working and it's looping is no stopping. So what it's doing is that is playing from zero from one from two. They're going back to play from zero from one from two and so forth. So change the speed to something around eight. Let's check by previewing, Yeah, now it's looking better. So let's close it. So now is it enough for a player to be working? Let's find it. Let's fire find out by trying to preview now. As you can see, it's still not happening. It's still sliding. True, I don't know if he's Ah, yes, rule also skateboard, but it's still sledding, so let's go toe even sheet. And here is where we will be adding events now before adding any event you'll go back to this layer right here and, ah, make sure to select the game layer, then a double click writer outside off the layout and we look for the keyboard pregnant. So here is our keyboard pregnant. So let's select it as you can see this message right here. Okay, so let's go back to even sheet one. And so, like I was saying before, this is where we will be watching all our events, the eventually It allows us to give our game some conditions as events and what to do when these conditions are met using actions so we can have event, sub, even condition and action. So each object in the game as a set off specific condition or even and action based on this type behaviour. Oh, other properties. So let's go and add Ah, a new event. 4. Player movement, Player animation, Mirror player part 2: and don't forget where we're adding an event. We are reading an event to make sure that when we start moving with our key bold ah, arrows, the player actually start playing the walk animation and he doesn't stand anymore. So he selected player and look for an event that's about moving. So here, because they want to trigger on an initial. We're goingto on emission triggers and we select on moved. So once were selected on moved. We can now add Annette action when the player is ah, moving. So I will select the player and we'll go to sit on emission and select walk. So let's did set that work now. What we are doing here is that we're telling our player to our game that when the player is being moved right, we need toe set its animation toe walk. So if, for example, he was standing and the animation will stand now, you need to move from playing the stand and emission toe playing the walk animation. Okay, now let's go back. Andi, select our player. A detainee mission. Okay, Not here, actually. Really. Go to properties and make sure that there's an initial and emission playing when Ah, we start the game so the initial and emission is going to be stand full. It said that now we will also add an event for the player to stand when he isn't working. So like when we work and then he stops, we want him to stand and to stop working. So let's go back to our even sheet and we love that. Even so, like before we strike to player and we'll go to an emission triggers Onda look for on stopped so we select that and direction that will be adding will be set an emission and set it to work. Now we have to events on DA two distinct action to reply to each one off them. Now let's go ahead and preview that. So as you can see now, when a press, my keyboard keys is moving, but when I stop is not stopping, is still working. Actually, we did. A slight mistake is that we are supposed to change the emission from work to stand when it stops. So let's fix that. Welcome to the programming world where you can make a silly mistake and spend hours trying to figure out what just happened. Bullets previewed one small. And now when we work, we can stand. We can work and stent, we can work. And when you stop, we stand. Now we are still jumping in their non emissions. So let's go ahead and six that. So let's go back and at the new any mission. So you already know the drill. It did an emission right click. Add animation and we'll call it to jump this time now when we selected. Still, there are no friends and we need to import friends from five and for jumping. You select, play a red up one and play a red up, too. So we select both on Open it. Now here are friends. Let's delete the 1st 1 and these are two friends for jumping now. Of course, when we do, we jump. We don't want to be repeating the animations. Who will live? Loop said to know. And ah, I think that we probably also keep the speed at five for Let's right to preview it. Yeah, that's cool. I think we can leave it like that. So let's close and as usual at the moment, the player does it know that you can actually are played at an emission. So we need to go back and set up. And even for that, So let's are the new isn't select prayer and look for any mission. Tree girls on jump. And then he laden Ah, new action. The checked actually said than emission to jump. Okay, uh, it's preview. Okay, now we can walk and stop and jump. As you can see, the jumping on emission is playing. But when he lends kind off, I don't know what is going on. So let's change that. Another anyone emission for actually falling after jumping and also lending. So let's go ahead and walk on that. Okay, so let's go back at the new any mission. You already know the door by now repetition Is the mother off science? Is it correct? Not show. That's at the new any mission and, ah, let's call it fall. Then we'll go ahead and import friends from fires off course, and this is going to be the only frame for falling. So let's open that can deal it this first frame. Now these are all off our emissions for the play. Now there's something else that we need to add Let's Ah, go to origin and make sure toe set the origin to bottom. So that's done next. Just right Click. Because we have so many and spreads so select. Apply to all an emissions. Yes, next one he selected off them. The region is at the bottom. Okay, let's move on. So let's add another event and will select player. Make sure to go to any mission to girls and look for on fall well at the new action and we'll sit down emission to fall. Okay, let's go ahead and save. So it is important to save and preview it and see what it's looking like. Oh, now we can work, jump and fall. So we need to change these so that when we land there are two possible thing that can happen. We can land in the continue working or just landed stent. So as you can see right now, when we learned any, if we land and continue working, we are sliding or we are working still. Okay, cool. So let's go ahead and fix that. So we'll add Ah, a new event right there and we will call it. We look for an emission triggers and select on Lend it Wisconsin voters. Now we'll create a sub. Even so, make sure to civic this event and press the s key to creating use Issa vivant And in a survey event we'll be checking if the player is moving Daniel other connection and said then emission toe walk, right So if his land and then moves So you want him to work and then you'll copy this event , test it and then you change the condition too, is let's actually there is no is stopped events So we love Toe Hackett and the way to do that is well, just select this. Ah, this condition right here and right click Then select the vote. Now this means the opposite off platform is moving. So right here were saying platform is not moving. That's why we have this cross right here. So let's sit down. Emission to stand. Okay, now let's Ah sieve. Usually we can preview Okay now any lens. If he's not, we're not pressing any kid to move is standing. If you're pressing an icky to move is working so that's good. Good progress. So let's close this window now we are done with our all our animation. But if I go back and I show you something when I moved the player on the right, he's looking on right side. But when I move him on the left, it's still looking on the right side. So that's kind off. Not good. How can you be walking in the direction and looking backward? It doesn't make sense, said Let's go ahead and fix that. So let's go back, toe even sheet and are The keyboard isn't and I look for on key pressed, so that's going to be our condition and we'll click to choose. Then we simply press the left Roky and that's it. Now we are a condition that's checking. If we've pressed the left Roky, then the action that we want to say it is, Ah, simply set the player and we look for visibility or appearance the eighties and will sitting mirrored to meal. Now that's done. Now what is mirrored if you go to an emission idiot an emission. This is a mirror writer. So if he selected okay, let me go to walk right, because it's we're doing that because off our work and emission. If I said to mirror, you can see that is actually looking on the left, any form, your it but is looking on the right food. Let's Ah, go back to even sheet and the copies best and we will change the key to write our key. And here we will set mirrored toe not Admiral, because we don't want it to be mirrored when he's looking on the right because that's the initial frame. So we are only mirroring this frame for the left side. So let's close that and go ahead and preview. Okay, now, if I move, you can see that it's two different thing is working on the left when moving on the left and looking on the right when looking at the right. So that's good for for now. In the next video, we'll be adding more grand toe are layer, and that will be it for this first model. So see you there 5. Add jump through objects: so we'll start by adding more ground. So let's make sure to select the ground, layer it, zoom out, select the window and zoom out. Then we can pain around. We consume it over more. Okay? No, it's Ah, Go back to our PNG folder and they really go to tiles. Then from euro tiles. You were selectable. Ah, tell year 25 26. So it's like proof of them. Drag them onto our layout. So make sure that the layer that you selected his ground so make sure that the grandly is selected. Then we'll move them around that about this position? Yeah, about here. Bring them here. Onder, if we preview you will see something interesting. You can see that it was actually an emitting, so we don't want that to happen. So we go eat it any mission and will set the remission speed to zero because they are selected to images. We have two friends and we don't want it to be playing like an animation. So we said to the speed to zero now if he tried to present an emission is nothing happening . So that's good. Next you just control left click and drag it toe, duplicate it and sit initial from for the 2nd 1 to 1. So as you can see, if you go back to, we did an emission. You can see that from one is this said, and zero is the other side. So we are just cloning it, then sitting the frame for the 2nd 1 21 So this is Object Writer. This is supposed to be a jumping through corn, so I jumped racoon. So this is it. Let's co Pete and duplicated right now. That's don't okay, let's go ahead and try to jump through them now if I tried to jump through them, you can see that are actually can't because they're just images. And by now I'm sure that you would have understood that we actually need to have be of use to them. So let's just select one off them because the old copies off the same one. So let's go. To be of use, Onda will add a new behavior that is going to be the sole ID attribute. So let's say like that. No, not actually the storied one. Let's delete that one. Yes, we selected jumped through attribute for a select out clues save and great and previewed. Okay, Knife. I tried to jump through it. I can jump to it and land on it. So let me go. I can try that again If I jumped, Read a land on it. And the same year. So yeah, that's it. So from here you have all the basics about the player. It's animation, mirroring him, lending sitting and emission triggers and dodging. Ah, solid ground element and jumped through element. So from here you have the basics to move on. If the cause and continue watching all the videos. And I can guarantee that we fortune learned so far you're good to go. So thank you and see you in the next morning. 6. Adding more ground and a parallax background: Okay, welcome back. And I hope that you are ready for adding some more ground in this time. Some cereals, sittings and layout to Giselle. So let's glide and start working on it. Now that you have all the basics down. How hopefully? So let's change this too long. Great. And change it. Do the same for this character. Drink it, but yep. Next we look for around that corner to put on the side so and make sure that you on the ground layer. So don't forget to make sure that you only grand Leah Select. Tell yellow five and value seven both and place them on to our earlier. So here teas. We'll do the same thing as we did for the corn. For the jump tricorn for Let's Go and edit any mission. Sit this speed to zero. Close it and ah, we don't want it to be initially at this friend. So let's go back and change the initial from toe one, and now it's looking more like a rounded corner. Let's zoom in yet. Now you can see that it's like a rounded corners, so we'll be adding another mountain. So select this block control left, click and drag it too much a plate or to copy it. Children. What do you want to use? Its? Put it right here. No, we can't even leave it here. So make sure to fall along by looking at the position and size sitting. Let's go ahead and change the tweet. Look it it's drug it up. But this high you can go back, Sit like this, duplicated. Do you be cleared it again. And this time you said the initial from 20 Okay, looking better. It's since he's gay. Move the sound Onda. Change it to this. OK, looking good. Now let's continue at another mountain. So let's duplicate it. Place it right here. Duplicate this guy. Place it here, select these good duplicated please it here and then we'll extend this one. But it's looking nice, So its continue drugging it Looking good. Now remember, because we are duplicating elements that we already have so like for this part right here is keeping the same be aerials that we previously had. So that's what's cool about it when we can just difficult it. Instead of doing the same thing over over, we just duplicated them and that's it. So the same from these grounds. It already have the sweet being you. So we don't have to hurry it again. You just duplicate them and that's it. Bullets at this one? No. Okay, No. Okay, let's look for another sprite that we don't already off. Let select Dal Yellow. Eight. Drag it. We want to create kind off the world right to That's good. Then you can drag this drag this out, Then you can change. It's sweet and I but this it's looking better now. So we have kind of a mountain like mountains that are stucked right. Okay, let's go ahead and other some spread. Sorry news. I thought I was lost. So selected. Tell yellow 16 and 17. Both dragged them, as you know, because if direct two frames, so that's becoming an animation and we don't want that. So let's present the speed at zero. Then we can just duplicate it on the We'll change the initial from for the 2nd 1 to 1, and that's it. We have another jump through object right now. So because we already know that the beauty off this object is supposed to be jumped through so we can go ahead and add that Be of you, select some True. That's don't the 2nd 1 automatically receive it because it's just a duplicate of the 1st 1 So that's cool. Now let's place it somewhere the bottle, like right to Okay, let's duplicate, you know, And this one. So my own here, the drug it don't and moved this one. So that's it as fast, right that we will need for the ground. Leo. Next, we'll add another mountain. So so far, this is what we love. Later on, we'll be adding most off. But for now you want to continue working on the game. Now that we have enough ground to add, Ah, enemies, you know. So that will be we'll be adding more Graham little for now. We'll keep it that these and focus on adding enemies. So there's greater. Pull this guy out here. Yeah, so if I zoom out, this is what it's looking like so far. So let's go ahead and save Now that we saved less previewed. Let me click that one small. Okay, now you can jump through Oops. The surrounded corners are not solid, so we'll go ahead and fix that. So that's select it the 1st 1 because they'll Yeah, copy or duplicates. So let's have the solid b of you, then go back and previewed. Okay, Now I can jump, actually levitated work from Yep. Now it's a solid. I can jump still so early it can move around. Now we've added more ground. And these, actually, this one is not so late. There's going to check that out. Yeah, it's slowed. Everything is solid. Except this one. Oh, yeah, yeah. So let's are the sort of behaviour to these guys will. Okay, now you've noticed this is our where our window is stopping and the game is not scrolling so that we can move forward to this grand right here. So to fix that, we love the new behaviour to our pale. And this behavior will simply allow the camera to follow him around. So let's go to be avielle and we look for movement. Be of yours. Is it movement? No, general bugles. So let's elect a scroll to plug in on. Now. When we stop playing, the camera is actually going to score two and four loaded player wherever is moving to so now, as you can see, when I tried to move, it's crawling and following the play around. So that is always at the center off our window. But now it's looking good next. If you noticed at one point our background is just white, so we'll go back to incident. Background then set its parallax properties 20 and zero. Let's go back and previewed out. Now we expect to buy ground so stay intact and not to move. So when I when it's calling True as you can see, the background is still the same. It's not moving. Okay now good stuff. See, in the next videos, where will be urging enemies and attacking them? So see you dio. 7. Adding Enemies to the game PART 1: Welcome. Bye, guys. In this video we will add enemies to our layout, set up collision detection for when our prayers collide with an enemy. And then we will add emotion as well as an emission for our enemies. I hope that you all ready for this next challenge on DA let's stories. So we'll start off by adding a floating enemy So we'll play. Seem right here. Yeah, right here So that our player have some difficulty jumping. So we'll go to find Explorer Onda. We look for the enemy folders for this close this go back to PNG Goto Enemies folder and here's our floating enemy. So let's select all It's an emission. Actually, three of them will select it and just place it on to our layer, which is actually supposed to be the game layer. So make sure you select the game layer selector enemy right here. Are you still on the work on food? No, it's looked quote that was, but so let's unlock it. Make sure to select him and the change its layer from background to give. But now we can lock it and go back to a game layer. And here is we can drag him around hoops. That was hot. So these shoes you once more that you have to be very cautious on selecting the layers where you want to place a natural object. So let's go ahead and ah, okay, let's preview it first. So now here's our enemy and you can see the animation is playing really fast. So let's go ahead and fix that. So go to 80 10. Emission On first you've noticed that it was playing only once, so we want to loop it. Yes, and let's change the speed toe A. It's not 58 it. Let's go ahead and previewed out. No, that's quite first. Let's City, that's five and preview that again. Yeah, that's look a better. So let's go ahead. Let's closings. That's great. And previewed. Yep, it's looking better now. Now, if you notice the enemy's actually in front, off early are far player. So let's go back and change it. Z index. So So let's go Dizzy order and we'll send it to the bottom off the layer because they are both on the same layer, right? And because this has been placed before it, that's where we're seeing Ah, our player behind our enemy. But now, if you try again now players in front. But we'll be adding an emission for when they collide later on. So let's keep on working. And I think more enemies before we add another one. We can actually cooperate this one and place it somewhere somewhere else when I will lay out and it's actually going to be right here who's of copy of Duplicated twice. So let's delete this one. You simply select it and press deal it on your keyboard. So let's are the flying enemy that's going look for the spreads. Yeah, tears flying in anyone to and tree select ticket on, Drag it to the layer to the Gimli and make sure the game layer is selected. We'll put him somewhere right here, and let's go ahead and put you that, see if he's flying once again. The animation is quite slow, and then it stops and is not even moving. So let's go ahead and a DEET on emissions. Make sure to set the speed toe eight on. We wanted Toby looping. Yes, and we said ping pong to Yes, okay, that's good. Now let's go. It and previewed and see if he's flying. Okay, we need to make sure that this is closed and also let's save. So let's get and previewed up now is flying. And as you can see, that's the ping Pong effect is going off going up and down. That was the ping pong effect that we've added. But as you can see, it's not really playing is just, ah, it's not doing anything. So first, let's set it is the order. So let's edit it and send it to bottom off layer and the next we'll go and other behaviour to it so that it can fly not Eastern's variable but behaviour. So let's say like that and we look for the sign, be of you. As you can sit in movement, be a veal. So let's elect sign. Yeah, cheese. Now here are some of the properties off the scent behavior. All we want to do here it's chained its magnitude from 5200. But first, let's check it out as it is, so, as you can see, is flying like left and right to recently. So that's our son be area right now, But that's not the kind off flying effect that you want to add, so we'll be taking it more. Welcome to hacking. So here, If we try to change the payload, for example to two, you might see the difference. Actually, let's not do that. Let's not go there. That's a bit premature. Let's just tender to magnitude because the magnitude allows us to set how far the object is going to be flying so we can reduce its like kind off a ranch so we can reduce it for shorter range or hard it for a great orange. So let's go ahead and sit it. 200. Yep, that's better. Yep, it's looking better. So now we'll go ahead and I don't know the sun behaviour because now it's just playing recently and we wanted to fly in our like, kind off wave ah, style. So let's go ahead and add another son behaviour we can add to send Bayview at the something that's really cool, So this is the 2nd 1 As you can see, it's signed to, and let's change the movement from a reasonable to vertical will also change the period from fort, too, and, ah, we leave the magnitude at 30. Okay, let's go ahead and preview that. Okay, Cool. Now, as you can see, our enemies flying, you know, way the way. So let's go ahead and place him somewhere else. I don't want him to be staying on the same site, so let's ah, duplicate it. Control left, click and drag to duplicate. And let's place him somewhere. Here for now on. Let's go ahead and preview. Okay. Now we have two enemies delicates. Okay? We are still in front of it. That's fuzzy and licks goals and years his twin brother. Okay, that's looking good. So let's close it. Let's change it is the order to bottom cool. 8. Adding Enemies to the game PART 2: Now we have two more enemies and then we'll be done with this Ah, section. So let's go and other working enemy. So you go back to file Explorer and, uh yep, let's elect are working in emulator. Actually, we just elect animation both to friends. So enemy walking one and to select it and dragged them onto the layer under a pristine right, you Onda will go ahead. And indeed the animation. By now you should be knowing what's going on. We live the speed at five and because we want there any mission to continue, we'll set it to yes, and also we are going to change its original richer and set it to the bottom. So Kate Hossein bottom and make sure that it airplay toe all animations. I said Yes. So yep, now we consider the origin is at the bottom for both. And if he tried to preview the any mission here we have it, So that's good. I hope that you've guessed what we'll do next, but if you didn't know, it's not a big deal. Will add a platformer behaviour to eat so that it can build just like our player right, because They're both working on the ground for well at the platform, a behavior to it as well. So let's go ahead and do that place. Look for platform, and that's done. Now we have a working enemy, so let's duplicate it so that we can off to off. Does guarding this Ah particular area Now I noticed I will have another one here just for you to notice something. Actually, that's place him. What? Okay, let's grade and provided. Now our enemies are not moving that just standing and playing the work animation by default . So what is happening here? First thing first, you can notice that the animation is actually kind off working through the solid ground, so it has to do with the frame off the image, so we have to set it to bounding books. On the next, we have toe programmatically set the controls off our enemy so that it can move on his own instead of expecting keyboard kids to move because it does the platform a b of your likely player. So that's a lot off work, but it's not really so. Let's elect one of those, and first we will come here and selective default control, as you can see, if enabled. Arrow Keys control movement Over was used the similar control. So we want to simulate control. So let's set it to know next, we'll go ahead and sit. It's abounding books foot. Let's set to bonding books like this and make sure to apply to all in emissions. Yes, now that's better. Okay, Not after changer the default control to know we need to go ahead and simulate that. And before before doing that, we want to know in which direction the enemy is actually moving. Then change it afterwards. So let's go ahead. And ah, at the new instance valuable to our enemy. And ah, the name off viable is going to be moved because we want to see it moving in which direction the type is going to be a text than the initial value is going to be right. So initially we want our enemies to be moving on the right side. So sit it. Okay, now, this is just a valuable like it's not doing anything right now. We'll be using it in events and action to change its value and decide what to do when based on its value, for example. So if it's moving on the right, for example, and this close to falling, we can change the value off, move to left and then simulate Ah ah, left key control left Iraqi control. So let's go to the event. Shit. So, like I said, since we've disabled the default controls off our platform enemy, it would be good to simulate them beyond the same using an event on our instance viable move to, let's add. Ah, an enemy isn't right. We want to check, that is, is on the screen. So let's look for that. Okay, here it is. Size and position is on screen. So when our enemies on screen right next will be adding a sub event. So after checking that our enemies are on the screen, then we are going to compare its value. So we select Compare. Houston's viable, and that is available is move, of course, and we want to see if it's equal to write. Hey, so he's supposed to be a string because it's city to text. So let's elect right. Okay, so first we check if there are enemies on screen after that. If he he's on screen. Then we move on and check if move is equal to write. Move. Is the instance variable that we've created an initial physical, too, right? So it's going to be equal to right. Then we add in action. We select our enemy and we look for simulate controlling platformer yet is similar control , and the country is going to be right. Okay, when the enemies on the screen we'll check the move instance Valuable. If it's equal to write, we simulate the platform is pressing, right? Okay. Next we'll add another sub. Even just we select right, right then add another's have even. And here we'll be checking if the enemy is by wall. So we select is by world that simply looking at let me consult is here, for example. It's close to a wall and here, too. So we're checking if he's moving on the right and is close to a wall, right? So let's other civilian is by wall and let's check. The decide is right. Okay, then we can go ahead and changed its position. First will change the Eastern's valuable move from right to left because we want him to move on the left side. Now we don't want him to be stuck on the right side. So let's go ahead and set the value move. Then we set it to left. Good. Okay, that's good, Actually. Will remove the serve even from here. Toe losing Detroiter so that it can be a on his own and not depend on ah enemy move right. Actually reset it back the way it was. Yep. Then, ah, we will do the same thing. So first, let's make sure that when is your okay, Let's go ahead and preview that. No, as you can see when it's moving on the right, then no fingers is happening, right? It's not Ah, the value off the viable is becoming left, but there's still nothing happening. So let's go ahead and change that. So to change that you select this ah sub vivant copy and paste it, then we simply change. Move Ah, replace right to left because we want to check the opposite so we'll just be changing the value off left right here on new change. The control to simulate will now be left, and we'll set to move to right if he is close to a wall on its left for we'll go ahead and change, too. So what we've done is we've just cooked. I copied this of event right to displace, and we've just replaced the value so that it can be the opposite. So let's go ahead and check it out. Okay, now it's bouncing when it's close to a wall and going the opposite direction. But we still have a problem, is looking on the same side, and it's moving quite fast for its great and fix that. So first when he's on the right, because that's the right position and is close to all on its right. We want to set, It's to me wrote. So let's go to appearance. Select set, middled. And, yes, then you just duplicate it. Please sit right here on DA. Modify it to not mirrored when he's on the left, because when it turns on right, that is initial frame. So let's go ahead and check it out. Good. Now he's actually looking in the direction where is going next. We love to change something with its speed, like it's moving really fast, so let's sit it 200 and take it out again. Team now it's looking a bit better. We have to change the 2nd 1 And actually, we did this one because it's just falling off. So deal it. So let's move on with your and change its max Speed 200 as well. Okay, not it's good and previewed. Okay, it's looking better now. They're moving a bit slowly, but ah yeah, that's cool. So maybe we can change the speed for 1 50 from Wonder to 1 50 So let's check that out. Yeah, one is moving faster than the other one, so we have to change it for both. So Yep, that's good. Let's go ahead and take it out. Yeah, it's looking a bit better now. They're still slow. Both. We don't want them to be too fast. Otherwise it won't make sense. What if you feel like ah, making them faster? That's up to you. You can just turn the sittings next. Our final and last enemy is going to be assuming enemy is not actually streaming because you're going to add a bullet behaviour to it. So let's drug all three frames in him, assuming one seeming to and seeming three. Jenny, we were talking about streaming in my next course, so we'll talk about that in death letter. Now here is our seeming enemy is looking in the wrong direction, so we love to change that. Let's get to a detainee mission. And the first it's ah said, Ah, it's collision polygon toe bounding books. Okay, goods on DA. Make sure to apply toe all in emissions flicked years, some fall of them. Next we're going to Miro. It's heretic and be looking on the left side because that's where we want him to be looking because that's where you will be going. So let's changed out and make sure to do the same folder The friends. Okay, now that's good. Now is looking on the left side. Next will are the bullet period to it. Because if we go now and prevue it, you'll see that is not actually moving is the static So I never tried to go. Why is aligning me jumping? Let's check that out. If I jump, he jumps. Why is he jumping? Why is he jumping like that's really funny. Let's go and check that out and fix that bug to this carrot here. Oh, different control was supposed to be No. So is different controls that? Yes. So it was actually moving the way we're moving. That's pretty interesting. Knife I jump is not following me. So that's cool. I don't want him to be oops to be following me around. So let's go ahead and have a look at our seeming Ah enemy. That's not really Siri. Okay, here is not moving, not doing entity. So let's go ahead and fix that. We allow the baby to him, as you've probably guessed, and that behavior is going to be bullet. So let's look for the bullet movement. So move an object I ate at its current uncle, typically used for bullet in projectile, so we wanted to be kind of a project all year. So no, a kind of a bullet. So let's keep it at that, and you will change the speed because it's going on the opposite side. So we changed the speed to negative 300 Onda. Make sure toe sit uncle to know and make sure to set the initially state to disabled if we enable it. Once we preview as the game start, you just be flying true. I would not want her toe happen. You'll seem very soon. Here is coming pew, and we don't want that to happen. Actually, we can keep it like that. We can keep it like that. But really do Michael exited to disabled first. We'll see about that little. And let's go back to even sheet because you want to learn more about events. So that's what we will do. So we'll add an event and the selector seeming enemy. And we want to look for when he's on the screen. So when we are close to it, right next, Mila the system event that will trigger it only once because they want to change it from disabled toe enabled. And we want to do it on the wells So we look for trigger ones. Well, true. And then we left the action and, ah, we look for set enabled in the bullet properties right here. Or is it yet set enabled and we'll set it to enable. Now let's go and look for the beer view that we have created. My kids will let me jump out, so you see, it's not on screen yet, so that's why we're not seeing it. But when It's on the screen now it's moving, so that's pretty cool. So that's about it. Ah, see you in the next video. Where will be adding flash behaviour to the player when is on collision with the enemies so that it doesn't look do its rigging right now, where we can just walk through and nothing up in tow. Us. That's really bad for a game, So let's go ahead and fix that. 9. Player collision with enemies and Flash behavior: Okay, so we want toe the flesh behaviour toe a player so that when it collided with an enemy, we actually seem flashing and feel like he has done something wrong. So let's go ahead and go toe add behaviors and ah, yes, where is our flesh burial? Here it ease. So let's select it now. We have platform behaviour scroll to and flash behaviour. Right, So that's good. Now that we have this behaviour, we want Ah, what is it? We do it it CNN and hard. It initially done no properties. Okay, so we want to trigger it right once we are close to an enemy on collision with an enemy. So let's go and create that even like itself likes explanatory. So let's select the player and look for on collision with another object here. Cheese collision is greater. So let's go for collision if another object on, let's select the object that you are colliding with, which is going to be first off putting enemy Daniela the new action. Select the player and ah, select flush and ah, the properties that will be adding for flash will be on time is going to be two millisecond off time, you will be too Miletic alert and the duration is going to be one second. So when that's done, we can go ahead and check it out, kid. No, Cool. When I collided with this enemy, as you can see, I'm flashing on and off. So that's really cool. Now that that's done, we will do the same thing for all other enemies. Or just copy. And ah, pissed to duplicate Goopy. Oops, Sorry. Pissed to duplicate on you. Repeated tries, right? Because we have four enemy, I think so. He I will change the enemy from this guy to the flying one. Then your change the object from the floating one to the enemy See me And then here we will change the object to the enemy walking right. So night supposed to be working for all off our enemies. So let's go ahead and prove you did it. So when I passed through this gay from Flushing unless we for the flying one on Flushing else world the working one, I'm flushing as well. So let's wait for the bullet. Who I'm flushing as well. So that's about it for flashing for our flashing player is flashy. Oh, that's good. So let's go ahead and move this one up toe. Yeah, right here before the enemies on screen. So let's put it right here. Okay, that's good. So that was it about flashing enemies, I guess. Next we'll be looking at attack. I'm not sure. So let's see what's next in the books, See? 10. Parallax Layer, Gems, spritefont, Global and instance variable: Welcome back, guys. In this video, in this model, we'll be covering Ah, new layer for the game. H u D the player life adding Ah, Sprite phone and a game of a state hope that you are ready for this next challenge. Onda likes usual let's duties. So we'll start off by adding gems to the layout, so make sure to select the game layer So selected. McGinley I don't know about you, but make sure you've selected it next. Ah, what will we do next? We'll goto find explore, make sure to go to PNG and ah, I attempts. Then we're going to select Blue Gem that P and G So we'll select this guy right here and then drag it to the game layer. Okay, Good stuff. Now let's just face it somewhere on here, that zoo me and all we have to do is tow duplicate it when I can actually play seat anywhere. We wanted to be around the layer. So let's see. We want some radio reason for him to come right here and face the floating enemy. So we keep Actually, let's move off. Floating enemy. Yep. Right. Yeah, you know, So this looking great and then you don't have to put three. You can just select one if you want for Just Dragon Place this one right here. So how does this look? Cool will be heading more letter, so let's focus on this first. Next. If we try to pray this, I'm sure they're going to be, you know, game. But I'm not sure that will be able to collect. The Mexicans were still flashing, so that's flashy. Who too much flash? Okay, now let's try and collect the gym when we quite with them. So I'm sure that you are getting feel toe for what's next. So let's add another event. Another even for the player to collected his gems. So let's go ahead and are they player event and select on collision with another object and make sure to choose our blue gym. Okay, next, we're going to add a connection and actually want this generator. So let's go to MISC and selected Destroy. So what he just did is that they set an event, and we've told the player that when you collide with the Bruijn, right, ah destroyed the bridge about let you put them, destroy itself So let's go back and check that out. Actually, we're telling the game that won the player collide with a blue gym. It needs to destroy the Bruja. So that's what I mean. As you can see, the normal blue gyms, because they have been destroyed by our game, might in my ticket. Okay, good stuff, guys. Now that our play is able to collect Jim and they disappear afterward ah, we'll go ahead and create a new layer. So let's do that. And we will call it H u D. And this ah will use this layer basically to keep track of the gems that we've collected and we will show it on our screen. So let's go ahead and first thing first. That's it. It's parallax sitting 200 like we did for the background so that it doesn't move around the slight when we're playing and we keep on seeing it on our screen, reminding girls off our many gyms we've managed to collect. So next we'll go in our file explorer. We need to do some dragging, so make sure to go to PNG, look for extra and then select this big blue gym richer and make sure that the issue delay I selected. Then we'll drag it onto that layer. Okay, that's cool. Ah, let's set its position toe 48 48. Good night's looking neat. Next, we want to add some text around to display like numbers and show. Like, for example, we selected one toe tree four or five. James, we've collected, not selected. So to do that will double click on our H you, Delia, writer and I will select Ah, Sprite front plus as a plug in. Then you place it on to our layer and then you'll go and load the front from file. So let's go back up in tow. Where did you leave our phone? Let's go back. Why is outfront okay here? She's Sprite front. So we need to go back into a think Yep. Here and go to spread front. This is it. So let's really me, too, like a deliciously gratuities and open it. So here it is is almighty front, as you can see. Like I said, I will have another cause and we'll be looking into, like how to create phones and all the step of stuff and because this is just an intro course. I don't want to go deep into that, but it might scare you. So let's drag this artery Law. We cannot from room to work beef because we have to do a lots of sitting right here. So we'll start off by changing the character with 2 53 and changed the cracked. I know. Actually, No. 50 tree. What is it? Move! Where did they get the front? It's 55 by 60 right? For religion with 2 55 And let's change the I to 60. Okay, now here we have it. Set a text. What is? Do you have to change? We will change. Ah, space carried to 20. Not negative one. I don't see any particular change, but he then we wanted to be centered. So will change vertical alignment from top to center. Here it is. And the next will do something a bit tricky. We will Ah goto phallus for Thatcher will open this text fight, so make sure to open this. Take side and we will copy this right here. So again when you come on this fellatio Don't move anything. Just copy this part off the text. Coupet by going to the game and here in card with Jessen who just paste it and the press enter. Now we have a special spacing. As you can see, it's looking neat and it will change the text from 1 to 0 because we want to be counting and we will place it somewhere on here. Let's ah set its position toe 87 by 20 and let's change it. Size toe 1 28 and 64. Okay, Looking good looking really good. Next to let's add a new distance, variable toe are found. So this is our fun traitor. We love the nuisance label and ah, we will call it type and ah, well, sit. It's type text and then the initial values going to be Jim. So basically, what we want to know is that at this point, what is this front representing? And here we wanted to represent our Jim count. Okay, Now, the reason why we're doing this is because we love the same thing for player heart, and we love to keep a count off his life. So that's why we need this instance were able to differentiate between the two instances off the front. So let's go ahead and work on our players life. So I will go back to blood from our Onda. Where was that PNG extra on? Let's drug geese hut! I place it somewhere here. Let's gent it toe 2 24 and 48 que looking quote. Next, we'll duplicate this so control, drag it and ah, change. Ah, its position to to 64 and 20. Cool! Next. Make sure to changed the initial value from Jim to heart. Now, when we go back here, we have Jim. And when we come here, we are hot. So this is keeping count off the heart and this is keeping count off the gym. So that's cool. Let's go into the next session and actually update When our player collide with the enemies , we want him to lose one life. And when we collect one Jim, we want to add one to the gyms. So we'll do that in the next video and see you there 11. Subtract heart/life if player collision with enemy and collect Gem: Okay, So far, so good. At this point, we are ready to count the number of Jim Collective with the help off a few events and the global variable. That's going to be possible. Now let's go ahead and get Ah, a global viable. A global variable is different for my niece tins viable and ah, so it was great and not that at global valuable. And we'll call it Germ. So this is going to be the actual Jim count, not the type like in the text. So the now it's going to be a number and the initial values going to be zero. So here we have a group of valuable gem that is going to be keeping count off the number of Jim that we've collected. And then you use this number and pointed here. So let's go ahead and go back to the event where we're destroying here. And, ah, since we are collecting it, Jim, we want to automatically had, ah to the count of Jim that we've collected. So we'll go and select system and add to then we want to add one to Jim, so leave the value at one and the viable to which we want to add to is going to be jammed. So select that to be done. So now every time that we're collecting one Jim, we're actually adding one toe. A global viable right here. That is Jim. So initially, that zero, When we collect one Jim, it becomes one and so forth. Now we've ah updated the gym value like every time that we collect. Adjourn. It's updating the gym value, but still, we haven't figured out a way toe displayed on ah, the actual screen. So let's buried and work on that. We are going toe are the system even on we will use on every tick. Ah, so as you can see right here it runs the action once every teak a k also known as always. So let's follow the world's off construct too. And select that next to Milady's up even. And, ah, you know, some even will select a Sprite front. And then we are going to compare instance valuable, so we check that the type is equal to Jim, so let's make sure that the type is equal to Jim. So let's make sure that we are dealing with despite front and not this one where the tape is hot. So that's why we said this instance, viable. So now that we know that top is equal to Jim, we can go ahead and set a Sprite front action. So let's look for action and look for set text here cheese and we want to sit the text toe . Jim. Basically, we want to set the text to the value off Jim, so that will do the trick. Now let's go and preview. Okay, let's move around and go collect some gems. Okay, now we can see our money. Jim's we've collected and ah, it's a blue. Did it updated on our screen? So that's really cool. Guys off. Really cool. Still, we're we have zero life, so I don't know how we are alive. Let's go ahead and fix that. So next we will do the same for checking the player life, keeping track of it and sitting game over if he's out off heart or life. So let's go ahead on select off player ways. Here is with one big eye looking at me, staring at me. I don't know Onda are the ministers valuable and the sisters variable is going to be hot and it's going to be a number, and the initial value when you start the game is going to be five. So let's give in favor of no, actually tree. Let's make it a bit difficult. You can change it if you want to keep it a tree because I like challenges. Onda Let's go toe the even sheet and I will select disobedient, richer GOP Best it and, ah, make sure that the type that we're checking is not Jim, but hot for Let's say that. And next we want to set the text to player Select Select player dot What's the name of, for instance, variable heart, So it's elect hot. So what we did here is that we went and selected a player object, right? That's when we type player. Then the dot simply means that going to dip a object and look for a viable that's called hot. So that's what we did. So we selected to play object. Then we've looked for the variable called Heart so that that value off heart is what is going to be our text like we did for Jim. So next we have to go back into our collision with the enemy and make sure to subscribe the one from, Ah, the art instance. Viable. So let's go. Yeah, teas, I think. Yep. So let's say the new player action and let's look for set value. Yeah, I tease and will simply no not sit very substrate from We want to subtract one from heart. So that's done. We can just copy it or duplicated to the other player collision. If Amy. So now, every time that we call it with any enemy, we're actually losing one heart. So let's go ahead and privy that. See if it's working and if it's displaying on our screen, as we wanted to or expected, too. So now at the beginning, we have three life. If I could light now I have to one zero. So is it working for the name utility? Negative one. Yep, it's working. You have negative one up, so let's go ahead. And we want to restart the layout when the players out off life. So when he plays dead, we want to restart. The layout is not really dead is just a game, so don't take it personally, so let's go ahead another new event, and ah, select the player. Then you look for compares tense variable. Here it is. We want to compare heart and check if it's equal to zero. If it's a less done or equal to zero, right, then if hot is less than or equal to zero, we simply want to select system and look forward. Start layout energies. So what will happen is that one our enemy dies or is out off life. We simply we start the game from the beginning. No, of course we'll be changing that when we have more levels. What so far? This is what is going to happen. Amused for the bullet. Done it to restart. That's pretty cool. But now we need to be stopped. Misty level our germs. Onda. We have our life back, but we don't want to have our James 20 to restart, so we'll be checking that out later. First. The first thing that we would is that, of course, when our enemy dies, you wanting to actually die, and we have an animation for that. So let's go ahead and had that. So go to edit on emissions. A new lead. The new on you, Michele, and we call it dead. That's when he said then Ah, it's good. And check out it of the players sprites. So we go to PNG players. That's electoral, period. And select this quite right. You What am I doing? I was supposed to do from here. Sorry, Gays. So blood former have struck perform a P and G players clear it and select period date as a Okay, so that's going to be our friend, as you can see from zero. Yeah, teas. So we don't care about this. You don't care about the speed for this, So that's cool. So let's go back into our even sheet Onda right here. Well, a disobedient on select system on DA Select Trigger once while True. So here it is. Special conditions. No, let me select it so we can read about it. So make a continuously true event trigger once, only when it first become true place as the last condition. Okay, that's cool. I didn't get that explanation, But what I understand is that this only happened once, right? So when the players ah is out off life and ah, the next thing that we want to do is that we want to apply something once on Lee and that is will add an action on gun, reflect our player. Then we'll sit is an emission to debt. So next we don't want to be able to be moving him around so well, actually desirable. So let's look for certain able in part, former it should be. So my writer here teas and yep, that's it. It to disable. And then we want to the system to wait for two seconds without doing anything. So we don't want anything to happen for two seconds. I don't even know if you will notice that two seconds has elapsed Boat. Let's do that. Okay, cool. Next will simply take this action right here and just play city at Boto. Okay, Now, let's go ahead and prove you that. Yeah. Okay. Let's go ahead and play. I can get Ah, some Germans. I can collect them. And now you see it's disabled and the game restart. Now, there's something that we need to make sure is right. So let's go and eat it. Any mission, make sure to select day that initial on, as you can see his origin is at the middle. I don't want that. So kick a sign and present at the bottom. Next we'll set. Ah, it's collision toe bounding books. Now let's go ahead and try that again. No, I'm not going for this time. So when to treat? Yep. So that's cool. And that's it for these videos. See you in the next one, Chow. 12. Player attack, bonus gem and dead animation for enemy Part 1: Okay, Welcome back. And in this module will be looking at the prayer attack using my you super Mario style. Deny figures of principle. Meyer, before what I remember did my younger days. I did play Super Mario, and it was like the most amazing game out there besides Street Fighter and Tom Raider. So okay, And we'll also be adding Ah, bonus, Jim, if we manage to kill an enemy so that's going to be cool as well because we're going to look at effects so off that you're looking forward to that. So let's start off by reading. It did, ah, animation to each enemy that we can kill. And here there are only two enemies that will be able to kill. It's the flying enemy under working enemy. So we don't want to touch our floating enemy. And I was streaming ah, rocket bullet type off enemy or projectile enemy. We don't want to kill those two. So will only add daily mission to these guys. So let's set that up. Is good or not new. Any mission. Call it dead. I don't really import friends from file. Not so school. There's going to PNG enemies and Here's our enemy flying friend for the dead animation. It's did the first friend. Okay. No, it's close. This make sure that it's the same for a 2nd 1 Because I know that some time, no different. Okay, that's good. That's so let's go ahead and do that for this standing guy and, ah, the new remission and call it dead. And let's elect from full file. Oh, you can just, you know. No, you can't. Okay, let's get an import from files. Is the working one? Here? It is. The selector. Make sure to delete the 1st 1 Okay, Looking nice. Let's change the origin to motor. Good. Now you're set to go. So let me give together Spoiler Attack is simply going, Toby, that we will be jumping on top of the enemy and ah, yeah, that's how you'll die. Then you'll be bouncing off. So the first thing that we want to make sure of is that when we collide with our enemy here on the Attackers, we want to make sure that it they can only attack us if we are not falling on top of them. Right. So because our okay, then me. Oh, let me show you guys is good and preview for those without municipal. Milo So basically, this is going to be our attack. So if we jump on top and right, we fall on top of him. We actually want them to be dead. So because ah, we want to check if we are not falling for them to be able to, like, eat us, we'll add a condition right to this event right here for the flying enemy, and will simply say, Ah, if these guys is falling and we'll do the same right here at the condition No, not you go to the working enemy at the condition and check that is falling. But normally we don't want to check if they are falling. We want to make sure that they're not falling. That's when we can eat them. So if they're falling on top of us, we can't hit them and you'll see what we're doing that So let's inverted toe not. And you do the same thing for this girl and let's great and previewed. Now you will see that one. I'm actually jumping on top of it. They won't be able to eat me and ah That's the behavior that we want to create. So let's great and check that out. So I don't know if you've noticed. Yeah, when I fall on top off them, they can't eat me. Let me go and try that once more. Right When I was falling on top, he couldn't let me send for this guy. But when I'm not, they can. So that's what we wanted to see and let's go in and actually walk on the attack. So let's add a new event and selected player and on collision with another object, I want to make sure it's the flying one. Then you want to add this up even where we check if the player is fully next. We want toe hurt, some actions. So first, let's go ahead and select our enemy, and we don't want him to be moving around. So really be looking to deservedly okay for our flying enemy there no desirable properties because it's not. Ah, it doesn't have a platform or be area. So we'll be looking at ah, the sign behaviour and ah said active to inactive. So we'll do that for the 1st 1 and then we repeat for the 2nd 1 So we're my Yep. Let's repeat for the 2nd 1 And ah, next we will set the prayer Victor way because we want him to bounce. So we want him to go back up. So I will say it is Victor Eternity 600 that will create that bouncing effect and the next we want to make sure that you're helping the day that emissions who sit on a mission to dead I would show. I'm sure we can place it right here. So that's good on da bomb. Let's copy this and paste it and the new agenda. Okay, there's something cool that you can do them. Sure, you guys, surely we can just select the whole event and look for replace, object and select the object that you want to replace. We can't Sorry, let's just come here and select a working enemy, said don't and ah, it's Ah, go Burke and selective working enemy and ah, look for sit and emission. Two dead. That's good. Then we can deal it. This, too, because you don't need them. We don't have send behavior. We'll add working enemy and sit disabled from platformer said. Enabled to disabled. Okay, that's cool. Now let's save that and preview. Now, let's go ahead and jump and tried to kill this guy. Oops. Slow things up name so I can jump on you This kind off word and it is that they keep on bouncing off and also do neo. It's why property is way high. So you have to change that. So we'll start off by changing set. Why? To set a vector way. So when you said Victor, why, it's here in the platform. Iberia. Okay, then we do the same thing. Rachel, sit Victor Way too negative. 600. That's good and previewed at 13. Player attack, bonus gem and dead animation for enemy Part 2: or kill. It's moving. Okay, now, as you can see here, just bouncing, bouncing, bouncing, tilled it down. Right? So we want to add a condition and make sure that when our enemies already did, we don't have to coaching you beating them. We can actually let them go, right? So we want them to disappear and never appear again. So let's say like this guy and we'll add the condition, right? So we want to make sure that this on the happens when the animation is not playing dead. So let's that condition and select our enemy. And ah, check is an emission play. So let's elect is playing and ah so dead right then we want to invert it. So what we're saying is that on collision with the flying enemy, right, check that the platform the player is falling and also make sure that the enemy on emission is not dead. Right, because if it's already dead, then don't do any off these actions. But if he's not already dead, that is, If the animation is not dead, then you can go ahead and president this actions, so we will do the same thing. Rachel and said the condition for working enemy Onda. Check any mission is playing and make sure that it's not dead by selecting it and just you voting it so cool. That's good and prove you. So there's good. Now I have not bouncing. Look it. But now not I'm not bouncing on top of it, but and as you can see, I can even call. Oh, so let's go ahead and remove them right once that did. You don't want them to stay around to stick around. So let's go ahead and select our enemy and we'll add the new Biagio when it's good and select fed right because we want them to fade out. Okay, now let's go back and ah first, let's Ah cilic them and make sure that it's not active at start, so select no and do the same thing for the 2nd 1 You see, here it is. It's going to be destroyed when it fade out so we don't have toward what destroying them. So next we simply into a dissection and select our enemy and simply start fit. Do the same thing for the next one. Simply select start fit and ah, Crist, Um ah, both the said Victor y platform or condition. So let's go ahead and check the dirt by previously. Let's see if the fitting away boom Yep, sleeping on it. What about this guy? Yes, he is. Now you notice that the 2nd 1 is Partner is not around. His partner is actually fading from the get go right, because his still said that. Yes, well, let's say that, you know, and that should be good. Next we want to other Boehner's because we want to enable our player to collect your bonus when he, uh, he managed to kill an enemy. So we want to add to extra Jim to his gym count. So we'll go ahead and first add that sprite toe again. So let's go to PNG Extra drag this bonus right here. We can place it here. Actually, let's place it here first for demonstration purples, then, Ah, let's great and other bullet burial to eat. So let's select it is its director. No, no, no. Okay, now it is So it's good. Another beer. You and make sure that it's the bullet one. Cool. Then let's set its speed to 70. And, um, we said the angle to know right? So we don't want it to be like a parable. We just wanted to be a straight bullet. Next we allowed the fate be a view and we re leave it sitting like that because we want to to be active at start. So that's going preview. See if there's anything happening. Oh, did you see it up? Let's try that again. Yep, it's fading out. So let's go and change some stuff because we don't want it to be fitting. Recently, we wanted to be fading vertically, So let's go out the new event even. And, ah, selector burners and look for one created. So where can we fund it? Okay yet is on MISC, right? Selecting created. Then let a great and add a new action and we'll set its angle. So let's look for sit Uncle said. Devil said Tunggal said, Hunger ways it, he concedes. Yeah, yeah, cheese on DeLaet stated toe. You want to set the angle off motion? Is it in the bullet period? Yeah, it is. And we want to sit it negative 90 right so that it can fly or is entirely not fly. Just move. So let's go ahead and previewed up and see if it's working vertically. Notaries enter. We wanted to be flings vertically. Yep, it is. So let's let me refresh Weaken. I see. Okay, now, that's good. So next we want it. Ah, actually wanted to be created when the enemy dies, right? So we'll go back in, select our enemy. Where is our enemy? Yeah, Cheese. So a lot of new action. And what we will do is I don't know what is happening with my castle. I don't know why this is happening. Please don't. Okay? It is not happening again. Oh, it's back. OK, just ignore it. So we want to, Adam, we want to spawned it from one off our enemies. So let's elect a flying enemy and look for spun. Another object. Here it is in the misc section, so choose ah, bonus as the object. And the layer where we wanted to be spawned on two is going to be the gamely, so Yep. Gin. So let's ah, press that above on. Da. Do the same thing right here. They're going to sell it our enemy and make sure to go to spawned another object. And, um selected burners and make sure that the layer is game and Don, then place it above as well. Let's go ahead and preview that and see if it's working. Oh too. Well, it's working. As you can see. When I killed them off, it actually appear. So that's cool. Some very good stuff. Now let's make sure to remove it from the layout because you don't want it to be shown at the beginning, right? So it's better this way. Next. All we have to do is make sure that we actually adding to to, ah, global viable that is keeping cut off the gems. And that's a lot. But that's the last thing that we need to do. So let's go ahead and other system action at two and make sure to add to to jail right. So we're adding to to Jim Press. It doubles on to next. Let's go in preview and that's it. We can wrap this section or this motive for Let's go ahead. I want to see now we are tree and now we have safe. And now we are seven and now we have nine. So that's it. That's working. Okay, guys. Ah, That's it. And I will see you in the next section, so take good care of yourself in see you very soon. 14. Creating Popup window for Gameover state: welcome to this model. Ah, pop up about game over and level completed will be talking about the visible and invisible layer level complete. If Player is on collision with a flag, will recovering even group and we'll change the player heart to a global variable on DA right now it's an instance viable. So we'll change that to a global variable. And then we'll are the restart button with a click and emission. Okay, let's start off by creating a new layer for game over or level completed. So that's going to be our pop up earlier. So let's go ahead and are The new layer will really meet to pop up. Okay, let's make sure to select it and change its parallax properties to zero by zero. Next, we'll actually start I d ing sprite onto our layer. So make sure that it selected That's zoom out. Okay. And ah, okay. Next let's go in our file explorer Goto platformer, then Ah Guo I folder and select. Ah, this window right here. So we dragged out onto our layer first it So this is what we have. Make sure to look the background layer, so make sure to lucky, so I can't move anything from the background. So now we have this window writer. We are going to change its position so well said it's X coordinate at 5 60 and ah, the Y coordinate at 3 36 Okay, good. Next we'll select the text to display at the top It I game over banner or level competed burner. So let's go back to a folder and look for it. So here, dear. So we'll select both, and we'll drag them onto our layer. Good likes will change its position and make sure that snuffed Grady selected on Let's Change position. So we said it X coordinate at 5 53 and the Y coordinate at 1 21 Get good now notice that you've dragged to frame. So it is in any mission because we have two friends. So let's go ahead and educated to make sure that it doesn't animate and that the initial frame is get move also. Right now, the frame is level complete, so let's go ahead and do that. So first you said this Peter zero. Now we have two friends right here, and we wanted to be game over initially so well said the initial frame to one. So let's do that. Okay, now we have given over as our first text. Okay, let's go ahead and privy that in the browser and see what it's looking like so far. Okay, we have it. So this is our proper player right now, so we still have some work to do, Like it's a more work to do, like adding a bottle, for example, to restart the Game one. It's it's Ah, once our enemy. Once our players dead and it's game over, you want to restart the level. So let's go ahead and set up that bottom for interaction. So, as usual, we always add Ah, Sprite from our fight Explorer. Let's go to the G u I fold the writer and, um, look for Burton's. Then let's look for the one. Okay, here it is. So let's elect but and 74 but on 77 I will place it onto our layer right here. So that's the one selected, and we'll go ahead and change its co ordinate. So right now the position is at 7 36 we leave it. That will only change the way. Coordinate 25 28. Good. So this is where we want it to be. Let me zoom in. Okay, So for this bottom, we'll change the frame as well because we have two friends. So let's go ahead and set the any mission. Speed to zero. We don't have any an emission. And we are going to change to be changing the frame manually eventually. So you don't have to worry about that now. Initially, we don't want ah this layer to be visible. So when you start the game, we don't want to see this layer he wanted to be hiding. And then it just appears when we lose. So let's go and set it visible property to invisible. So here, teasing properties were chair will change initial visibility from visible toe invisible. So, as you can see right yet saying, choose whether the object is visible when the layout start, so we don't want it to be visible when the layout start. And so that's why were sitting it to invisible. So we will go ahead. You know, eventually it and actually we're going toe add connection to show the game of a window. When the player Is that off life? Or when the players did. So let's look for that event. She'll be so my Rachel, um, I can't seem to find it before we already found it. Okay, so here, cheesier, it's event 26. So first we'll delete this action right here, because now when our player is dead, we don't want to automatically. We start the layout. We want to show a pop up window done from there, we can decide to restart the layout or not, so we can actually do a wave distraction. So I'm deleting it. Next, we will actually set our proper player visibility toe visible. So let's ah, great, Another system action and we look for set layer visible. So here it is, right here in layers and layout. And ah, the layer that we want to set visible is pop up. So make sure that it's in quote, Onda said. The property visibility to visible. Okay, so let's go ahead and prevue and see if it's working as we expected to sticking up some time. But just be patient, Okay, that's quite interesting. It's still visible, so let's go back and see what we've done wrong So, actually, guys, we didn't set our layer. Ah, initial visibility to invisible. So if you go back Roger and select this button. So this is what we've said? Ah, visibility to invisible. So let's get That's why when we prevue, you can see that it's not displayed right here because we accepted to invisible. So we did the wrong thing. That's up in the lot. You just have to be really attentive. So let's get it back to visible and actually select our proper player by double clicking it . And now you set initial visibility to invisible. So let's go back and privet it. Okay, now it's invisible and let me try to die. Yep, night showing up only when the player is dead. So that's good. Good progress. Let's go and then move on. So now we can see our layer pop up when the player is dead. But when we try, if we try to press the restart bottle, so let me go back, you'll actually see that there's nothing happening. So look it So lemon juice one. Okay, so if a precedent, there's nothing happening, so we will change that by setting up an event and some action. So let's go back. Actually, before going ahead and fitting up event well, actually introduced a new object totally out. So just double click outside of Delia torture, and then you look for it. Touch plugging. So here it is. Make sure to select it. Now it's going to be available for the entire project, so that's good. So let's go ahead. Ah, in the even shit and are the new even. And, ah, we look for system and let's look for layer is visible. So here, cheese layers and layout. So let's say like that and, ah, the layers pop up, of course, so make sure to write that in court. Okay, so now we have a Nev ent that's going to be triggered when ah, our proper player is visible. So let's go ahead and other sub event, and this time around we will check if we are touching the bottom. So let's elect our touch object richer and actually, we're checking if we are topping the bottom is like kind of clicking. So on top object and then you select our bottom. Okay, Now we are checking if the proper player is visible and then when it's visible. We're checking if we are actually ah, touching or tapping the button. Next legs actually rename this button to restart. Okay, now, next, we are going to our connection and we select restart and we will change it Frame from 0 to 1. So we went ahead and change it, Friend. Next. Ah, we don't want anything to happen for to milliseconds. So let's go and look for weight in the system actions and set it to the open to okay, that's good. Next will set off for him to to. So basically, we were just sitting it back to zero if you watch. So let's go ahead and look for set from so here cheese and lets it it equal to two. So this that we are doing, they're just basically just simulating an animation manually. So we're sitting there from toe one density, setting it back to two, which, of course, is zero. So actually, that set it to zero. Look it. Then we'll, uh, you just copy dissection with you. Okay, then next we can actually restart the layout now, so let's look for a start layout and thats done, so let's go ahead and preview that. Okay, No try once to and okay, now it appears that so let's go and try to top of cricket. Now you can see that the frame is changing and the layout has actually restarted because our prayers back right here at the beginning. So let's go in and try that second time jury will go somewhere else, like right here. Then you can see our pop up window appears. And if I click on Restart, we are back at the beginning of our layout. So now our bottle is working. But when we start the layout by clicking on the restart button richer, the pop up window doesn't disappear. So that's quite messy, because we wanted to disappear and we are able to continue playing are again. So let's go ahead and make it disappear and, ah, as you probably nobody. Now we will sort it out by using an event so it's great and, ah, at the new event on the select system and look for on start off the layout. So you want to make sure that when the layout start, pop up window is actually invisible. So let's go into our detection so system and look for sit layer invisible, certainly a visible story on. Then we'll select pop up and make sure to set its village visibility toe invisible. Don't. So let's ah, select it right here and make sure to place it at the top off even sheet. I was just making sense because that's when they lay out Start. So we want to put it at the top. You don't have to, but I just prefer to put it right there. So let's go ahead and preview. Okay, so here is so let's go, like right to and see if it really start. So now we have a pop up window that appears, and that's good. Now it's disappear and layer to restart through. Let's move on and are the global valuable for our prayer life. So I see you in the next video on the take 15. Add Global variable for player heart and a background to the popup window: Okay, so it's a great and create a global valuable for a pair, life or heart, and I will substitute it toe the previews hot instance viable that were sent to the player . This way we will be able to reset its out every time that Delia to restart or after losing . So let's right. Click what you're and even sheet and at Global Valuable, the name is going to be player heart. So let's make sure you get that right. Oops and on the type is going to be number on. The initial value is going to be What was the tree? Yep. So let's set it to tree. Okay, Now we have a new global variable that we will have access to it in all our event sheets and throughout the game because it's global. And let's go back to ah, where are players? Actually losing his life fades right here, so we will change these events. Subtract one from heart toe, actually subsiding form a global valuable. So first, let's deal. It does so just press your delete key on a keyboard, but so make sure to select teacher one of them on DA deal It okay, Now we'll go ahead and add the new system action and set value. No, not really subtract from and we want to subtract from players out on Duval is going to be one, so we can just duplicate it. No council. So let's just duplicate it. So press your control key. Ah, left, click. Then just drive. If your mouth so do the 17. And here, too. So now instead of changing ah instance variable That's on the player we actually subtracting, subtracting one from the player heart global viable. So since we've done that, we don't need that instance variable anymore. So let's direct our player and actually go ahead and delete it. So we just double click on add and edit, then click on this being right here, so make sure to select it first. Then, ah, facility us. So that's it. It's gone. So let's go ahead and also change our action for the spire. So if I go ahead and prove Udi's so it's wait for it now, as you can see now, when we start, our life is directly at zero and our prayers dying, so we need to go ahead and fix this and That's also because you remember we have an event right here somewhere. Is it? I think I got it last time. Um, we have detection somewhere, trying to look for it. Oh, by do it. Okay. I think that because we've deleted Ah, that instance valuable. So all the actions that were attached to it, I've been deleted as well. So we love to replace that because I can find it in ah, even shit right now. So Okay, lets go and undo that. That change. Okay, so here it is, Buck, Let's see if you took me back now even she does. Well, okay. Here it is. So toe under the comment that we just did You just press control Z, right? So let's go ahead toe our system, actually, right. As you can see, it disappear right here. When I delete it again, we're pressing control. Right? So let's press control, Z, bring it back. And here it is back. So lets go ahead first and ah, sit. Ah, our text from the player heart instance valuable to the global valuable. So we set it to play out here cheese and next we'll change the section So we don't want to the prayer. Ah, heart right here. So we'll go back, back and actually change it to a system and we'll compare variable and make sure that we're checking player heart is less than or equal to zero now. Once that's done, we can actually come and deal. It is valuable, so let's do it. That on select yes, and now we're good to go. So let's go ahead and privy that. Okay, now everything is fine. Okay, so let's go ahead and restart now. Things are working properly, but we still have a problem because our heart valuable is still a negative tree when we start the layout, so we need to go ahead and fix that. So let's go back to even sheet. And actually to fix that by resetting Ah, our player heart value from zero to tree. So we need to go back into our start layout event right here, and let's make sure that we re setted value. So let's select reset global valuable. Or actually, let's just set the value to let select a pure heart on. Let's set it back to tree. Okay, so let's go ahead and preview that key Now let's see if when you start the layup, the very is going to be treated. Yep, it is. So that's done. Ah, let's actually go ahead and add the background toe a pop up menu so that it stands out a bit more because, as you can see right now, it's kind of confusing. Well, good, right? So we want to set up a background so that the focus is actually on our window on our pop up window more than having the game as well, playing around. So let's get and fix that. So let's go back to our layout and make sure that they probably I selected on double click . Then we'll other, it tells background. Now, this time around, we're not going to import anything from our folder. So let's just zoom out and select. Ah, this feel button right here and make sure that the color is black. Then just click in the middle of the square. So now we have the black background and make sure to Reese is the image convert Converse Toe 32 by 32. Okay, so let's go ahead and close that. So that's not what you want to see. So let's go back and it it image. Oh, that's good. So now that we have days, so now it's showing up in front off ah, window, and we don't want that to happen. So let's right. Click and change it to the order and send to bottom off layer. Now it's at the bottom of the layer on DA. Next will change its capacity because, as you can see right now, you can see anything back. So let's go ahead and make sure you selected Let's Look for its capacity here, cheese writer and let's set it to 60. Okay, now you can see in the background. Next, we are going to change its size because right now is a bit small, so we'll change it. Size toe the window size. So let's go ahead and select the layout. Goto Project Properties. Selective You. Here's a window, Say so Let's copy that and select this guy, but and let's make sure to change its side right here. Knights of it. Bigger Now I don't like this squares that in the background, so let's go back and fix that. It it image is actually some kind off margin, right here. If you can see it, we don't want up. So let's just make sure to feel it as well on De So if you don't know what I just did. So let me price controls e to go back. Where was where it was before? So now you can see these transparent space right here. So make sure to select our field bottom and just ah, click on this space is right, and that will be done. OK, now you can close it and actually consider teeters change. We don't have that effect anymore. So let's go ahead and set its position to zero by zero. And let's go ahead and previewed. So now let's see if we can make it purple. Okay, It's looking better now, I guess. As you can see, there's the background right here and we have the main window that's on focus. So that's working great. And if we we start, it disappears. So that's looking Ah, really good. And next. Ah, all we want to do is actually would you just want to show some data on our window? We don't want it to just on empty window, so we'll go ahead and Ah, like other gyms, Score writer. We can, I d it and our life. Of course, we know if the game is over that I mean, we have zero life, so we don't have to show that, but, well, great and sure many gems we have collected. So let's go ahead and work on that. So let's select. Ah, good. First, let me hide this. Then we just drag this Jim and the front. Then we will select the gym and we go to layer because this is the copy. And you saw said, it's layer to pop up and you do the same thing for the front city to pop up as against a disappear because they're no longer in this layout. But the initial value are still the same. So we have just gender the duplicate er, layers to pop up. So if we show proper here, they're so now we are going to change their properties. So let's select the blue gym and we'll sit. Ah, it's X coordinate to see 48 and then it's y coordinate 2 to 72 good Next will selector front, and we will change its X coordinate 24 96 and then the way co ordinate 2 to 40. Okay, now that's looking great. So let's go ahead and preview and wrap up this video. Okay? So now, Okay, now we have ah, data right here showing on our window. So that's good for game of us. So far. So soon In the next video, we actually add Ah, flag like our checkpoint and the done from there, we will stay level completed, so see you there. 16. Adding a level completion point, using events group and level completed popup: good. Let's it up level competed. So make sure to select the game layer so we can actually hide to this proper player. So just check it. Now. We will be working on our game, Leo, so make sure that it's selected so and let's at our checkpoints from around the year. So let's go back to a file Explorer and we look for PNG folder. Then we'll move on to the other folder, the folder called Order and Let's Elect This Flag Green up Sprite on Drug it onto our layer . Make sure that the layers selected his game, and if it's not, you can just fix that by coming right here in common properties, and you can change the layer toe anything else, so make sure that the Layer writer is game. If you forgot toe, check the Gimli a writer and let's place it at the end off our layer layout. So right to So what they are doing is that now for a game to be for our level to be completed, the prayer we love to reach this point. Now that's great. And at an event that's going to trigger the level completed when the player collide with this flag. So when the place close to this flag, we want an event to trigger the level completed, pop up. So let's add a new event. Let's elect a player and look for in collision with another object and make sure that the object is the flag green up. Right? So once that's done, when I'll play a collective if the flag ring up first, we want our system to wait for one second. So it's good and look for the attraction. Wait. Okay, Next we want to set pop up to feasible, because when we are playing, it's going to be visible. So we want to go ahead and look for system and look for sit, layer visible and, ah, select a pope Pope and said Visibility too visible. So now when we quite if the flag are probably is going to be visible. But then we need to go ahead and, ah, change its frame. But before we do that, introduce a new concept so we'll go ahead and add a group event group, so just right click and look for at group. So select that and we'll call our group player on the mission. Don't worry. If you don't get what we're doing right now, it will all make sense. So let's select that, then what we'll do. We'll just look for all our player in the mission. Ah, even on drag them into that folder. So let's go ahead and select this even number 2345 six, nine and 10. So once that selected, we can press control and X to cut, then select Pay an Emission and Press control and V to Paste. Now you wanted to be a sub event off this group, so let's select it and drag it right inside. Okay? So make sure that hopes so. Make sure that it's right insiders so vivant. So once that's done, we'll go ahead and new and add the new even group and this stuff. Oops, So that's right. Click and Add Group, And this time we'll name it player control. Okay, so now we want to set our player ah, control ourselves for Let's great and look for different control. It's ah, somewhere charities, different control in the platform's behaviour on Let's set it to know. So as you can see right here, it says, if enabled Iraqis control movement right and otherwise use the simulate control. So we are going to similar to control. So let's set it to know. So let's select this and create this up even and then use a guitar player and look for similar control in our platform behavior. Picture me somewhere. Actually, that's not what we're supposed to do. So we'll create a key boats of even sorry so little for keyboard and look for keys down. Then make sure to press Ah, you're right. Our key Daeniken press OK and don't next. We love connection and we select our player and you look for simulate control. So here, cheese and then you simulate the right control. So we are simulating in moving to the right, basically. So let's do go ahead and repeat for left and right, so just select it and we'll duplicated so press control C control V than control V one small. So we have tree. So let's change the key here on DA pressed the left key, the left Roky Onda. We'll change the control to left for great into the 70 pressed the up arrow key. Then we go ahead and change the control toe jump. Okay, that's good. Now we have a pair control right here that's good for its great. And are the player even group where we'll be placing these two groups? So let's name it, player select. Okay, so let's elect play on the mission group on, Place it off the sub evil, then do the same thing for prayer control on. Let's drag this up. Okay, good. Now we're almost done. So basically, why we did this is that we want a way to disable our player all at once, one equal light, if our green flag. So because we cannot go toe all the events and check them. So if we have this group event, so if we disable it like if I tickled visible writer and let's go ahead and preview, you'll see that our player can't move on. DA. That's That's the kind of effect that we want to add when is close to the flag and before the pop up Windows appears so like right now, if I tried to press any kids, you can't move. Everything is disabled. So that's why we did that for Let's go ahead and right click and Togo disabled for that. It can be enabled and we will change it right here in this event. So let's great another system action on Let's look for CIT Group active on the the group name is going to be player and ah change its state toe deactivated for now when our player collect with this green flag, the system wait for one second. Then we showed a pop up layer and our player is edible to move or limiting itself. So let's get and put that on top and real actually add another system detection. Onda. Let's set it to 0.5 singles and replace it before the activating repair. On the next, we'll go ahead and sit a neck shin for complete. And let's set the frame from game over. Toe level completed. So we said it's from toe one. Now that that's done, let's go ahead and previewed out and we can work dissection of. So let's go ahead and try to complete this. It's okay now you can see Okay, it's to showing game over for you to go ahead and fix that. So let's wait and look at Ah! Oh, banner. Rachel. Okay. The initial frame is one, so we need to set it to zero. So let's set it to zero. That's are you debug? You just try to look for where something went wrong and then you fix it because it happens a lot. You might know everything about the software, but some time, you know, you can make a slight mistake and you should be able to look back into your code and see what you did wrong. So that's why I'm keeping this. So you guys consider it? Actually, I can make mistakes, but I can go back and fix it, and that's really important. So let's go it and ah, try to finish. Okay, now the frame is level completed, but we still have the restart button. So we love to add ah, other levels forced to move forward. So that's what we'll be doing in the next section. So see you guys there and take care of yourself. 17. Adding more ground and enemies to the first level: welcome to this model guys. Here we'll be covering Ah kee connection and actually will change our green flag toe a door . So be ready for that. And before we go ahead and do that well, first start by adding more ground to our layout toe a level because it's a bit too short right now. So let's first idol pop up layer. Make sure that the game layer is selected. And before even moving, I'd let's go ahead and change our layout properties. So go back to project. Make sure to select layout and we go ahead and change the size from 17 8 to 3000 so we'll keep the light at 6 40 What? We are just extending it sweet for that. It can be a bit longer, like this old space will be adding Ah, new Sprite and object. So, so far, everything that you have done so far can remain the same. We just go ahead and add more ground on decide. So I will start off by assuming you. Yeah, this is looking great. Next, we'll great and select some sprites. So let's go back to obstruct Platform A, P and G. Let's go toe tiles. Make sure to select. Yellow tells because those are the one we are working with. And then we will select Ah Taliaferro, 10 entirely living. So it's like both of them, and we'll drag them onto our layer now because we've selected to friends, so it's kind off like an animation. So let's make sure to go ahead and fix that. So we'll change the speed to zero. And next we'll go ahead and set the collision polygon because now you can see it's just a small square. Okay, let's leave it at that. Will fix it letter and you get to know why. So that's good. Let's actually drag it. And, uh, yeah, looking good this way. So let's go ahead and do the same thing for Tyler. Uh, yellow, 19 and tile, Yellow 20. So select both bull friends. Well, pretty tight here and make sure to grate. And he didn't any mission as well. So let's gender speed to zero. What did now it's looking good right here. Let's ah duplicated. Move it. This position. Now we can duplicate it the screen books because we are basically creating a mountain. So let's ah, change its size. So we'll be doing a lot off duplicating and, you know, moving around dragging, extending, shrinking until we have a perfect level. So that's looking good. So far, I don't know if we need to add another one. Okay, let's start another war. Yep, Nights looking good suffer. So let's select this one on DA Duplicated Que looking good. Next, we'll go ahead and select this green books and we shrink it extended, then duplicate. We'll extend it, then drug it this way, nights looking nicer. So lots last. Actually, let's extend it a bit more like this. And let's elect this round it. Ah, box right here. Set it up this way. And let's change the frame from 0 to 1. Okay, it's looking good. So now we have a nice mountain, as you can see. So let's go ahead and finish our level. So let's go ahead and ah well, first, let's go back and what are you going to do? OK, let's go ahead and had another mountain. No, we don't need to, so let's just drag this out and we leave it right there and let's reduce deals like, yeah, I Let's duplicate this grass. Felicity. Actually, we don't need that. So just pressed. Delete key. Let's shrink this and select around it corner and duplicated on both side. Make sure to change a different so that it much is. Now we can shrink this. Okay, now we have our mountain. It's great. And at the 2nd 1 So let's drag eight and city to operate here. Okay? No, let's move this around. Good. They say, like, this duplicate, and then you just shrink it. So make sure to pay attention to the position and size on the left off your window. Actually, we almost done, if not done. So let's ah, select both on duplicate. So I'm sure you already know what to duplicate it. Simply control left, click and drug. So let's place it somewhere around here. So this is while door is going to be and then really great. And, ah, please sit here and, uh, somewhere around here, So let's move these, like, richer. So it's looking great, I think. Ah, that sit for our level. So let's ah, actually come back and select one of these. I can. It's ah, make it to be different. So select one off these coun and let's go ahead and move it. So you landed somewhere around here to be a bridge because I was sure the play I want to be able to jump from you actually will be able to. Well, it just hurt this in case he needs a web. Probably had something like a key hope here, you know? So just to give him ah challenge so we can select this too, and just move it a bit like it not just going to make much more sense. Good. So this is our level so far looking great for letter, the some fancy stuff. So let's go to a PNG folder, make sure to go to other and then let's look for some flowers, some plant. So we select this place it This is only and, uh, let's put it right here. Okay, let's duplicate do the same here. It's a drug it up like some around here. And make sure to set the Z orderto bottom off layer, giving so well placed them on. No groups or press control Z make sure to select the plant, and we want to place them like this particular plant on a low flying corns off, looting cools. So let's go ahead and look for the next one. I think this is the last one, so let's place it somewhere here. Now that's good. So let's go ahead and select another plant. Ah, probably this one, actually. Let's look for something that's only group that just green. Which one? Okay, let's look different. And they will place him on the rounded, uh, ground. So, like on this one, it is a just for decoration, you know? They don't have to do this. Can just leave it alone. I just want to do it. Good night. So let's zoom out and see what it's looking like. So far. Good, actually, let's go ahead and remove this from here. Let's who did somewhere here? Yes, somewhere longer or ground. Okay, Nice. So if you want, you can go ahead and add more plants. But your interest off time are you just go ahead and skip this for if you want, you can do it on your own. That's up to you. And also, if you go to tens and look for yellow tells the the circles right, so you can also add them from where, like you cannot do media. Then just duplicate, you know, just to give us some kind off field so you can do the same thing. We are just I didn't get to add some type of field toe again to our layout. Sorry. So, yeah, something like this. Will you do the same thing right here? So just duplicating it. Ah, like a said, you can do it or not like it's up to you. Oh, ah, Be spending too much time on this because this is not a design, of course, of course. So I won't be spending too much money, So yeah, it's looking a bit better this way. I mean, I think so. I don't know about you. Oh, populated. And if you don't can tell me to remove it and they look into that request so so far, so good. Now let's move our enemies as well and make sure that the layer that you're working with is the game layer. So make sure that you are on the Gimli when you're doing all this. So it's a great than the place our enemies. So it zoom in and I will move the swimming in it. Oops, We'll move it right here. Like someone yet making sense. Onda. It's good and drag this flying enemy. So let's duplicated Onda. Leave it somewhere here and then the next one somewhere here. Then let's go. Let's place it most of this. Okay, Next, let's select the floating one. Onda, move it! Somewhere on there, do we don't even need it here Because let's put you here. That's going to be more challenging. Then you direct this and let's sit at the top, right? You Okay, so that's about it for our enemies and our layout. So that's like this level. You'll be adding more level, like with more. Some stuff. What? So far this is what it's looking like. Hope that you like it. If not. Ah, kindly tell me and you can actually just use what you've learned so far and creating only if you want. But if you want to follow a longer so just that you just stick toe what I'm doing, and then later on, we will have a project where you will be in charge off creating your own layout. So that's it for this video. So see you guys in the next section, where we'll be holding the keys and the door 18. Debugging: looking oddity of, Ah, our layout set up and everything is looking neat. Let's go ahead and preview it and see if there's anything wrong. Get before dinged up. Let's make sure to move our flag because we don't want the level to be over before it is over. So please see to it you okay, Now, let's go ahead and prove you that good. So everything seems to be working perfect, but im sure theres something wrong somewhere. Okay, Already, you see this guy right here, sledding through some object, and then we just disappear. So as you can see the things that we forgetting to do, So let's go ahead and do some debugging. So I've done decent people on purpose for us to see that it made loss off mistake. I hope that you get off. Noticed it. If not, let's great and fix that for first. These item right here, it's supposed to be on the ground layer. So let's change its layout ground for really great and do that for all the plant. Because I'm assuming the island begin earlier. And that was a big mystic. Normally, when you walk on the level, make sure that all the ground attempts or spread on the ground layer, So make sure to select all our plants and place them on the ground layer by just going into the layers. Properties right here and change to ground would do the same thing for the last one. Set it to ground. Next, we'll be changing all the boxes that we've added this and this wolf. So let's set it up to the ground layer and then all duplicate will inherit from it. For now that they're both on the ground layer. That's great in preview and see if all is working perfectly. If not, you know, group. I can do more debugging, so stick around. Okay, so let's go ahead and continue. Movie Still going true now, as you can see, some off Don's, uh, not solid, because we can walk through them and some of them are still on the ground layer. So we need to go ahead and I still on the game layer. So we need to go ahead and change that to the ground layer. So, like, this is still in the game. So let's say that ground. Same for this one, this one as well, so let's make sure that everything is on the ground layer. So now they're all on the ground layer. But, ah, let's go ahead and turn them into solid, for it's like the 1st 1 out the beer view and make sure to select silly because all off our ground object should be sold it. Nothing Els, because we want to stand on them. So let's say that too silly on. Let's make sure that the duplicates, you know, to be of you. Okay, that's up next, when it's good and previewed up. So it's always important to preview work guys because, ah, if you don't prove you don't get to realize that you've made some mistakes, and if you move on, you'll be so priced. So now they all seems to be on the ground layer. What's now? They're so late, But there's still a problem, right? As you can see, if I jump. I was standing somewhere around here, and that's not good. So we need to go ahead and fix that, plus some off the enemies that you've heard it, a nature not present. So let's go ahead and change that. So, like, right here, we are supposed to be having a flying enemy. What is not out and right up to? So let's elect our enemies. They're on the game layer without visible. Same for this one, this one and this one. So we'll be doing more debugging before we continue. Let's make sure that OK, there also lit. So let's select these books and go to a detainee mission. And as you can see, this is Ah, it's collision police Polygon is and it's just a small square and ah, let's fix that. Ah, let's set bounding books. Next we select is red that and then delete it and make sure to apply to will any mission. But it's oops, oops, Oops, that was a bad idea. So let's go ahead and select this. Set it to bonding books selective, drag it up and then deal it. So let's go and check if it's reflecting on the other on the duplicates. Yes, it is. Yes, it is. So let's do now. That's but let's press control Z to revert the change. Okay, that's good. So make sure to check that the emissions BD zero. That's OK, so let's go back and preview that. Okay, So we're back checking on. Still, our enemies are not prison to flying once. Now we can work climb a mountain, Contempo. What we don't see are flying enemy. So let's go ahead and see what's going on for flying enemies. So that's like this one on. Let's shake it. Properties must have changed. Something are the initial visibility is visible, So why are there not showing around? So as you can see, if we're we check our duplicate properties. So let's first go and check the original flying enemy. If you check its properties, you'll realize that fade is set to know, right? What? When we come right here, it's dead two years. So I don't know if the same thing is happening with you guys about it's happening on my site. So I will go ahead and fix that feel city to know do the same thing City to know and, uh, city to know here to set it, to know about this guy. Okay, Um yep, Everything seems to be perfect now, so let's go ahead and preview that and wrap this ah debugging section up. It's really useful for you guys because when you will be working on the final layer on the final level, I'm sure that you're going to find lots of Berg in your court. That's why I've put this section right here to help you guys out. Okay, so let's go it and close Now there's something that we need to do. Let's Ah, deal it this and we'll do it this to. And then we reduced this and then bring it down, dried it, bring it down, and then we'll go ahead and move this month and done. I don't like the effect when the play is jumping is actually going out off the layout, and that's not looking good. So let's go ahead and fix that for bringing this back up here and, uh, beautiful move right around here. Can it? This will be here and make sure to drink this down. And let's make sure that our enemy is not fading out from the get go. Okay, that's cool. And, uh, let's move. Do this right old here. Okay, let's move this down. Not that should be perfect. Almost perfect. So let's go ahead and check that out. Now we have all our enemies. Prism. Kate's looking better yet now we don't. We still do. Okay, so that's it for this video girls about debugging. So see you in the next videos. Where we in the next video, where we'll actually be talking about replacing our flag with a door and adding some kids on our layout. So see you there. 19. Adding keys, collecting keys and keys HUD: Okay. Welcome back here. We are going to be talking about Ah, keys. It's you d animation. Adding keys collecting case. Ah, looking the door and on looking it on DA winning the level when the player collected the door. So let's start off by selecting or Gimli a make sure that the game layer is selected. Next. Mutu's Our kids spread. So let's go back into a platformer folder, PNG. And then ah, no, not other. Charlie's not here, So let's go back and look for items and the charities. Here is a beautiful key. So let's drug that on to our game earlier. And then we'll just play seat ah, on our layer so that we will be able to collect it. So let's live one here. The next one will be somewhere. Hope here. Yep. And done. Another one will be here. Okay, next to let's go to our each, you, Delia and the lad. Ah ah que count on the mission. So let's go back to extra and make sure to dry key Zero key, one key to and Kitri. So let's drag old up all the friends on Ohh you, Delia. So make sure that the layer selected. Is it you? D and ah, let's change its origin. So it it on emission. Make sure that we select left and ah, right click and apply toe wall. Any mission so now played. Everyone is considered origin is on the left, so that's close It and the next move changed the position. Ah, let's Jennet X coordinate toe 3 68 And then it's wait, why co ordinate to 48? Good. Next, let's go back to our game layer. And now we want to keep count off the number of kids that have collected. And to do that before we reflected right here will select our player and we'll add the new Eastern's valuable. We'll call it Key, and the initial value is going to be zero. So of course, the type will be number. So let's close that now. Let's actually go and other the capability for a pair to collect the kids. So if we go ahead and put preview this so as you can see, our key animation is just playing, it forgot to set the speed to zero. Oops. Now if I quality, if the kid is nothing happening, so we need to go and set that on the mission of So before we do that, let's elect our key Goto editor animation and make sure that the speed is at zero, but it it doesn't unlimited itself. Next, we'll goto even Sheet and Lada a new event. So let's elect a player and select on collision with another object and make sure to choose Key Green. Okay, now we have an event that will be witching toe check if the player is colliding with the key and next Miladin action to remove the kid from the layout. So let's go to MISC and select the destroy and ah next. We want to reflect ah discount onto our key player on our prayer key instance. Variables. So let's select player and the Let's look for I had two instance valuable, and then we'll be adding 12 key. Now that that's done, we are keeping count of it, and now we want to display the count off kids that we have. So let's go ahead and add a new action and make sure to select this key right here, and I will sit friend so we'll select the player and then dot We select the key. So what we did right here in this statement is that we are simply selecting our player object and then from our player object. We are looking for his keys. Instance viable, and that value is going to be the frame number that we want to display. So at the beginning is that zero? So when we collect one key, the frame is going to be one and so forth. So if you have ah, if you want a better look, we go to edit animation, as you can see when he has zero keys. This is the frame when he has one key dish is going to be the frame right from one. When he asked to Keith, this is going to be the frame from two when he Elstree keys. This is going to be the frame, and that's will be from Tree. So let's great and preview that. So we move on and let's see if we can collect our key. Now we are collecting our key, and it's reflecting on Ah, the H u D layer. As you can see, this is stuff that's really tough. Okay, Good. So far as you can see level completed. Onda. We want to guide and change that. So let's go back. And actually we replace our flag with a natural door that will be open when we have collected all keys. And when the player collide with the door, we reach our checkpoint and the level is completed. So let's go toe file Explorer Good to PNG Goto other and we will select. Ah, dog green top. So let's elect Dark green top and the open top dragged out on to our game. Leah Okay, let's move it around. Okay, here we are. Finally. So we leave it here for now. Let's go back and we select dog unlock and open Select it and bring it on to our game. Leah, when you place it went there. So this is our nice door and ah, before we move, let's make sure to select Duggan Top Go to edit animation And we said to speak to zero because we want to change the frame Onley when we've collected all the caves and we'll do the same thing for the door lock. So a determination and make sure to set the speed to zero. Now let's select both. Okay, what to and right? Click and see Order and Cento bottom off layer so that it's not in front off our player. Now let's go ahead and look for player on collision with our our flag right here and ah, let's select this event and ah, right click. Then we place object and ah, it's asking us to pick the object to be replaced. So let's select the flat, flat green up and replace it with the door green lock. Good. Now we need to make sure that this event is only triggered ones right when Ah, the door is actually open. So when the door is locked, we don't want anything to happen. So let's get a preview as you will be able to see right now. Let me be disguise first. Okay? Oh, try and collect. As you can see right now, the level is completed. Event when the door is clocked, right? So we need to make sure that this event only happened when the door is open. So let's go ahead and ah, hard the condition. So let's elect this event price. See, two are the condition. So let's elected dog gridlock and we are going to compare it frame and will make sure that the frame is one which is the door open. So let's go back and check. I want to shoot. So as you can see, this is from zero. So we want to make sure that the frame is from one before that happened. So that's good and see something I'm going to cheat. So let's move this play around because they don't want to be repeating the level from stop . So let's place him somewhere here and let's great and preview. 20. Unlocking the door and completing the level: Okay, now it's great And select. Ah, collect all our keys And if we come right here, nothing happened. We've collected all the keys, but the door is still closed. So we will go ahead and fix that as usual. Will goto even sheet. That's where all the magic is happening. So let's add a new event and then select Ah, the player. And we are going to compare instance valuable. So let's look for that. Here it is. And we'll make sure that ah, to check if our keys instance valuable is equal to treat. So if we've collected three keys, we want to go ahead and before we add any action, actually will make sure that this only triggers one so it doesn't keep on triggering again and again. So that's at the sub. Even so, let's elect our event and press s to create a sub event on Let's go to system on DA. Let's look for the loops, not the loop, the special conditions and let's ah, select trigger once. Well, true. Okay, that's done. Then let's actually change or doorframe. So let's sit to frame toe one, and we'll do the same thing for the top as well. And ah, set thing 21 Okay, good. Next, we can actually go ahead and deal it. Discs. Ah, flag. Because they don't need it anymore, Soaries. And then it's Oops, Control Z that selectivity. And then just move it on. Okay, good. So let's great and preview that. See if it's working. Okay? This time around, you won't get me groups. Now, we've collected allowed trick use. And let's see if we can finish this level before day. Okay, Now the level is completed. As you can see, we've reached the door, but ah, my flying enemies still eating me. So we love to fix that. Okay? Everything is now perfectly working. But when the pop up in the RPF, it will be good to display the key as well. Right here, right? I mean, we don't need to What? We can still do it just for the sake of it, because that window is kind off dull. So let's go to the papa player and the next great and ah, okay. First, let's make it visible. Next, we'll go to extra toe, are extra folder and select this key drug. It make sure that the key selected, and let's move it somewhere around here and ah yeah, let's keep it. Position us at 4 48 and 3 52 Next, let's copy this front at the top and duplicated for Let's move it. We can just check its position. What is 4 96? So we'll do the same thing. Set it to for 96 for bottom one. So the X coordinate is the same. And next we want to make sure that the type off the phone is key. So let's change our the instance. Valuable to key. Now the 1st 1 is Jim, and the 2nd 1 is kids. So good. So let's go toe even sheet and make sure that we get the actual value. So let's go to D. C event right here. But papa player is visible on DA Let's create the sub, even on the let's elect system, and we look for trigger ones while true charities. Next, let's elected this sub even Condon. Let's add another sub even let's go ahead and look for the sprite phoned, and we're going to compare Eastern's valuable when we are checking for the type. When you want to make sure that the type is key. Next we'll go ahead and set the the text. So let's let those bright from Onda look look for set text. Yeah, right. Eve. And we want to set it to the number of kids that the pair read as so let's elected pay a red and access its key instance viable. So that's going to be tree off course. Okay, good. Now. So let's go ahead and previewed and wept this video up. I'm getting good at this game. Oh, yeah, I'm really getting good. No. Now our key is still at zero. So we need to go and fix that because it's supposed to be displaying tree right here. So let's go back and check that out. So we're checking. The type is key on bright here. The type is supposed to be key. So that's good. There's nothing wrong with that. And next we're sitting the text off despite front to play that actually we have type o supposed to be kiwi floor case. Okay, so let's go and check that out again. Kit, No. Have played this game so much that I'm becoming a master. India. Okay, Are Keith still of reflecting. So let's go and see what's going on. So that's select player. Then you look for key, okay? It's a capital to the type is supposed to be lower case K. Okay, so let's get and check that out. Welcome to debugging a zoulis on its healthy. So that's good work. No door is open and we can easily win and everything is reflected. As you can see, we have treaties and we have collected two gyms. So that's it for this video. Guys see in the next section and remove tomar phone stuff. 21. Adding touch control and creating an object family part 1: Okay, welcome back. And here we in this ah model will be creating Touch Control, Libya adding button capacity and we'll see how to use and create families. Object on doubt. You kill our button control and are out to have both keyboard and ah, touch control so that we can also play on a touch screen as well as on a desktop or laptop . So because we want ah to create a Web rose again, we wanted to walk on our computer and on the tablet and smartphone. So that's why we need to add the starch control. So let's great and are they layer and newly and we'll call this layer touch control. Touch control. Good. So let's go back. Let's I'd are probably out. Don't to see right now and let's zoom out and been next. We can actually Sure. Probably er, let's just place it before, Okay? So that when ah disappears, we can still see our touch control. But in the background note in the foreground. And let's I did so let's go toe Ah, file explorer and ah, let's look, let's go into the but not for more folder. What is it? Let's go to the control folder and we'll go to flat, dark and, ah, here we are some control. So you select direction controls and control for jumping. Who these? Our control left right and up. So let's elect ah, flat, dark 23 placing toe touch control layer and we'll gender its position. Let's set it X coordinate toe 1 28 Andi. It's why coordinate toe 5 60 Good. Let's go ahead and select flat duck 24. Let's change it. So why coordinate toe to 56? And it's why coordinate toe 5 60 Did it? Let's go back and do one last. Ah, we select flat dark 25. Drag it and let change its co ordinate. So let's turn to the X according it to then no, it. And then the way. According it to 5 60 like the previous ones. Okay, Now let's select all two of them on DA Change the opacity to 70. Good. You can see this nice little effect. Now let's make sure that when we play around So if I go ahead and preview, let's wait for it. Mm. As you can see, they're static. So they're not moving. If the players. You can see when I go back, I can see them. But when I move forward, don't know where to be found. So you want to go ahead and set that layer to set its parallax properties. So let's make sure to select Touch Control and said to the pyre, Likes properties to zero by zero. And now, if I try to previewed, you can actually see the static and, uh, they're not moving around like other elements, so that's good. Now if I tried to press them, As you can see, nothing is happening and we want our player to react to this control as well. So let's go ahead and add more event. So let's go toe even sheet. And, uh, let's look for prayer control with this group right here. Now let's ah, right click on this event and will select, make or break actually sexual live int and select Michael Break. Do the same thing for two of them. The next melodic condition and we'll select. Ah, let's look for touch. Let's look for is touching on touch object. Is there any starting object? Yep. And let's select the appropriate bottom business. Okay? Here we are talking about the right hours. We'll be talking about this one. Come here at the new condition on go toe touch stretching object. My let's like the left one and make sure that this is the right one. And here let's select out Oops, it's a light touch is touching object and let's elect up. So what we did by using make or break were simply ah telling our event that there are two things that can happen here right before you simulate pressing right, left or jump. So first you will check if we're pressing. Ah, right, our on our keyboard. Right. So if that's happening, then you can go ahead. You don't have to check this condition. Just go ahead and simulate. Ah, platform is pressing right. If this is false So if we are not pressing our right, our key then check if we're touching right are flat, dark bottom, that's the right one, right? And if that's true, then you can go ahead and ah, simulate of pressing right. And we are basically repeating the same thing all over the place. So we are checking If this condition is true, then we go ahead and set up our action. If it's not true, then we can check the 2nd 1 And if it's true, we grade instead operation. So that way, if we only keep boat, it's working this condition, this action will be applied. And also if you on a tablet or smartphone touchscreen, the same action will still be applied. So let's go ahead. You know, an emissions. 22. Adding touch control and creating an object family part 2: and we'll do the same thing right here where we are checking if the left arrow is pressed or the right always pressed. So we'll go ahead and ah, select that event. Michael Break. Don't let the condition for Let's elect touch. And this time around your selector is Ah, we select on touch. So it's time for untouched object. And, ah, this is the left are also to be this one. And right here let's ah, make or block and are the condition. Let's look for touch and ah, select on touch object and make sure that it's this one. So that's it. So we are basically checking for sit me rope. So let's go ahead and preview that. Okay, now, if a press disc E is moving on the left for press, this is moving on the right, and if I jump is jumping now, let's see if it's mirroring. Yes, it is, as you can see, is looking on the left when moving on the left, hopes and looking on the right, one moving on the right. So that's good. So you don't quite some progress so far, guys. So let's go ahead and continue in that direction. So next we will be adding, Ah, an object family for its quote on. And as you can see, we have our families folder right here for it selected, left, click and ah, select at family. And let's go ahead and select because we want to create a control family. So let's elect off our controls. So just double click them. Yeah, they are place. Okay, now we can really me to control And the reason why we do this is that if we have an action that ah affecting, for example all off our control, we don't have too great and repeat that same action for each control. We can just set up something for all of them, right? And it's easier that we'd making a work easier. Like imagine if you are like, let's say, 10 controls, for example, and you want to set an animation for them. You can't go into each control, you know you will have to do it 10 times and set the animation. But now we can just select this control object and said the animation and it's going to reflect on all off on all off our controls. So that's what we'll do right away. So let's go ahead and not an event. Because right now, when you click any off our controls from the government, when we click on any off them, you can't even notice that you are actually touching control. Object, right? You're not feeling like a touching anything. So we need to set up a nice and emission for the player to feel like is actually touching the bottom. So let's go in another. In event on, we select our control right here. So this is, ah, family object family that we've called control. So let's select. It will go back and select our touch, and we look for untouched object for your teeth. It's cliquey, and we select our control off object family control as the object that we are touching. That's how easy tease right normally would have to do it for all the controls. But now we can just do it for one family and done in great and select that control and then looked look for sets scale here, cheese in size and position. Then we set it to zero put night. I were great, another another, even for Let's Cilic touch, Let's look for on any touch end, and then we love connection using our control. And we are going to sit this scale one small, so we'll set it back to its original Ah, its original size, which is one great. Now it's great and preview that I can't now. Okay, let me move. I moved back because I want to die. Someone holier. Okay, now, if I press this, you can actually see that little admission. And the same is opening for the right one. And also, when I'm jumping is actually dancing down, down, the dental turned, doomed. Okay, so now you can see that you have this animation and that's it for this video, guys and see you in the next model and no PR liking what we're doing so far. And you are having fun creating the scum just like I am