Max Payne 3 Movement System in Unreal Engine 5!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right so I wanted to try to make the max pain 3 gameplay mechanics because one of the homies had asked me in the comments of the last video which if you haven't checked it out I mean go check it out since it's a pretty old game I had to rewatch a video on the gameplay mechanics from the Dodge SL roll system to the cover system and the shooting system it was my goal to try to recreate these two things within 2 weeks unfortunately I was actually a lot busier than I expected last week so I was only able to get the Dodge / roll and the cover system which I honestly think we going to be two of the tougher ones since I've never done anything like this to start off I started with the rolling animation and I went to the goats at mixim but unfortunately they only had a forward rule at this point since the code was done I then had to change it up to make it easier to customize and add stuff to it which honestly I should have done in the first space but whatever but anyways we have the code here originally I had just made it into a function but then I uh ended up looking into these things called macros which Unreal Engine has where pretty much it was going to make it a lot more customizable I'm not really going to go into detail as to explain the code like how I did in my past couple videos just know that if you want to copy this code you're more than free to but this is what I did and then when it comes down to the event graph all I did was bind it to a button and if they press it with the w key it does the forward rule if you want to be able to add the side rolles all you have to do is turn this key to the D or a key and then just play the animation that you want to do but yeah that's it for the rolling system now on to the cover system so for the cover system it was actually super tough and it was a pain in the yes mainly because there were some things that Unreal Engine just doesn't have anymore when it comes to Unreal Engine 5 or well from Unreal Engine 4 to 5 so I had to look up uh some things as to like when to tell of a player's moving left or right but to start off I'm going to show off the animation blueprint which this was honestly the easiest part so for the animation blueprint I just added a new state called the cover I made a new state machine and from here I had my different animations or well my different states again I got these animations from miimo which they had uh plenty of them for me so Stant to cover is just the player going from the idle or and or run position to the cover position cover Idol is just when the player is leaning on the wall and the walking is both going to be the left walk and the right walk to make this work I can't lie the code is super messy and again I'm I don't want to explain it just because of how much code it is it was a lot more complex than I expected it to be but right now I mean it works as to whether it's the most efficient I'm not entirely sure but it works so I'm going to just show off the different sections of it and I'll be going through stuff when it comes to like the branches and stuff like that so first we want to make sure that we're not in cover yet so if we push e and we are not in cover we set ourselves to be in cover so what this does right here or well mainly this whole section right here is it just looks for a wall that has the tag of cover on it or I guess Collision type of cover kind of like what I did with the swing points I then made sure that if we do hit something we send a message over to our interface that we would pretty much be able to use for our animation blueprint as well after that we just snap our player capsule component or the hit boox in this case on uh onto the wall and then we set a play animation Montage to whatever length our animation is and then set the ACT actor's rotation and say is covered to true now that's just for the idle state which it's a lot of code and to move left and right is pretty much the same thing so as you can see here this is pretty much the move left to right up here that is so what we're doing here is just uh calculating the direction that our player is moving so this one would be the move left because we want it to be less than zero and this one is the move right because it's greater than zero and then all we do is just send out a message over to our interface for the move left and the move right and then I copy that same so that way if whenever we're moving left we're pretty much throwing a sphere next to the players to check to see if we're actually still next to a wall or in front of a wall I guess and if we are still in front of a wall we just make sure that the animation stays in place and the actor's rotation stays in place with the animation this was because anytime I was moving the player's rotation would go with whatever way I was moving and I didn't want to do that so I just made it so that it stayed in place with the cover idle animation and it's pretty much the same vice versa for the move right now I did want to make so that I could move from cover to cover but I ran out of time to do anything else so I'm planning on making a part two where I expand on the cover system maybe even make that slowo shooting system that it had because well it's pretty sick not going to lie and now to show off how it looks like in the game [Music] [Music] but yeah this is how I made some of the gameplay mechanics from Max pain 3 hope you all enjoyed it if there are any other mechanics that you'd like to see me try and recreate let me know in the comments below thanks for watching
Info
Channel: JCGameDev
Views: 886
Rating: undefined out of 5
Keywords: max payne 3, max payne 3 pc gameplay, rtx 2080, max payne 3 rtx 2080, swifty unknown, gameplay, max payne, rtx 2080 gameplay, max payne 3 gameplay, unreal engine 5, unreal engine 5 tutorial, unreal engine 5 beginner, ue5, ue5 tutorial, game development, indie game development, gamedev, gaming
Id: lfapU69TvUo
Channel Id: undefined
Length: 4min 42sec (282 seconds)
Published: Mon Jul 08 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.