How to add any new ability In Lyra project | Unreal Engine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys today in this video I am going to show you how you can add a new gameplay ability in Lyra so let's get started first of all we have to decide for which map we want to add that ability because every single map in lra have a different kind of experience experience this one is a kind of data asset in which we will add all the things required for that map like different kind of abilities inputs and all those things that experience will handle so for this video will add that new ability in this lore expansion map so I will just go in this if you go in the world setting of this uh map you will find a default gameplay experience this experience consist of all those things like uh all those settings and abilities inputs all those things so we will just open this browse to this it's already open here so I will just open this one inside this one you will find a lot of data assets these data assets are the only thing which are controlling all those things uh that should go on in this map while playing this game so for our thing we have to uh about abilities we have to go inside the default Pawn data this is the thing which consist of all those abilities if you double click on this and open it you will find three more data assets inside this one first of all we have to go inside this ability set shooter this dat data asset consist of all those gameplay abilities that are required for this map so I will just open this data ass set inside this you can take a look like this is our hero jump gam playay ability death gameplay ability Dash emote and a lot of kind different kind of gam playay abilities so for everything we are also going to create a new gameplay ability and uh that ability inside that ability we will just create a uh like super powerful ability which will kill all of those uh enemy players at once if they are in certain kind of radius okay so let's create our gameplay ability and for creating my gameplay ability I will just create that game playay ability near that Millie game playay ability inside this folder only I'm going to create this is only for tutorial so uh after this I will be deleting it mainly so I will just create a new game playay ability here and make sure it's the Lyra gameplay ability class and I will name it and inside this one I will create my add my code which I need to do when activating this ability but before that I will add this gameplay ability inside my data asset so inside my ability setor hero shooter I will add a new thing I will just click plus here I will add new thing here here I will choose my ga Mass skill after adding my gam playay ability in this data set I will add a input tag also and for input tag I will create a add a new subtag Under This input tag and I will just name it m skill and I will add this inside my default gameplay tags. ini and click on add new tag and I will choose this m skill tag and I will save this data asset and now we have to add inputs for our thing so we will go back to our hero data shooter game data asset inside this we will choose this input data hero so now we have to add a input action for a varability and we need a input action and we have to give it a gam play tag the same gam play tag which we gave here we have to give here for our input action so I will add a create a new input action for this one I will just create wherever these things are I will create a new input action I will name it a m m skin and now I will select this I will go inside my input data hero I will add a click plus here I will add this input action here and give it the input Ty Mass scale now this one this thing is also done now we have to add this inside our mapping context so for that we have to go inside our um uh experience and inside that we have to select this data asset L shooter game shared input inside this we will find two of these input mapping contexts so I will choose this IMC default inside this one I will add my mapping so this is i m scale and I will choose like whenever I press U uh you button on my keyboard it will activate this game play ability and kill everybody in a certain radius if it's of opposing team so all those things have been done here and so for testing our our game playay ability if it's working or not I will PR add a print string here if it's even activating it will print this thing I will compile and save and let's play this ones and so now if I press it you can see in the corner it activated M skill so our ability is working now we can add our code here for doing some kind of dangerous things so I will start adding my functionality inside this this ability so in this ability I'm going to uh create some functionality which we can kill everybody in a certain radius if they belong to the opposing team okay so let's get started and for doing this I will first of all I will get uh the function what was the name yeah get all actors of class and inside this I will choose my main pawn and our main Pawn will be this one everybody Ai and uh opposing team and our team is going to use the same Pawn so I will just get all those actors from this class after that I will do a for each Loop and after that I will verify if these guys have the ability system component or not I will get the ability system if it's valid only then I want to proceed and after this uh we have to get a subsystem get lra team subsystem and from this we can compare the teams now we want to compare this one this will be our a and uh second one will be our own PA so for that one we will use get lra character from actor info and we will compare this and if both of are from the same team we don't want to do anything because we don't want to kill our own on guys so if it's a different team then only we want to kill those guys okay so if they belongs to to a different team so if they belong to a different team and they are in a certain radius and for that I will get this sector location and after that I will get the actor location of our Pawn also and I will use the distance function for this distance to D vector and I will compare it and if the distance is less than for example like 700 CM then only I want to kill those guys after checking this I will apply the game playay effect and for that I will get my ability system component for that I will choose this function get L ability system component from actor info I will call the function apply game play effect to Target and for the game playay effect class I'm going to use the lra created Gore melee melee game play uh gameplay effect it will cause 100% damage so everybody in this in this 700 CM radius will die if those belongs to our opposing and I will take this one and I will give it the reference of this ability system for the Target now it will apply to the opposing team only so for level I will just set it to one only now in this ability after doing all those things I will end this ability also and on the completed function first I will add a delay and that delay will be of 3 second so I I will be able to activate this ability only after 3 second after activating it once so that completed I will add the end ability so our ability is complete now we can test this also let's play test this now I will just run to my enemy team and try to kill them before they kill me me these boats are like very hard to kill those guys are here I will steal them yeah I reached near them near that and that guy died but for confirming it properly that our ability is working I will just increase the radius to in like I think 2500 for confirming if it's working properly or not because those BS are very hard to kill when reling those guys are killing me instantly maybe I can kill them from far away now I will just go those guys are there I will just press you and those guys should die you can see both of guys died let's play test this one last time these are the guys I just pressed you both of those guys died and our ability is working properly if you guys have any kind of doubts in this video you can join my Discord Channel or drop a comment here on Discord we can chat about these kind of things and if you are having any kind of issues I will try to solve all of them and uh if you like this video please like And subscribe to my YouTube channel that will help me a lot and if you want to support these kind of videos you can join my patreon also bye-bye see you in the next video
Info
Channel: CodeFizz
Views: 126
Rating: undefined out of 5
Keywords: Unreal Engine, Gameplay Ability System, GAS, Tutorial, Game Development, Game Design, Mechanics, Abilities, Unreal Tutorial, UE4, Tricks, Design Patterns, Gameplay Mechanics, Ability System, Video Game Design, Game Development Fundamentals, Unreal Engine Features, Unreal Engine Insights, Game Development Tips, Gameplay Design, Unreal Engine Tutorial, GAS Tutorial, game dev, ue5, ue5 lyra tutorial, unreal engine 5 next-gen, How to add any new ability In Lyra project | Unreal Engine
Id: VR5rGMKlFVM
Channel Id: undefined
Length: 11min 58sec (718 seconds)
Published: Sat May 04 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.