Very good spot! It looks like I skipped over defining that in the header! You will want to add: UPROPERTY(Transient) TArray InitiallyGrantedAbilitySpecHandles; Sorry, and thank you for spotting that.
thanks! also quick question, on my project ive been using enhanced input purely through blueprints, and was wondering how i would go about triggering an ability in blueprints, lets say from the on completed pin from an enhanced input node.
Actually you can make your own custom getters and setters for each attribute instead of making a big chunk of pasta style if's or switch in PreAttributeChange function. However it's really great tutorial about basics of GAS framework.
Thanks! Custom Getter / Setters are great, but they can be used anywhere, clamping in the preattributechange is for a very specific part of the attribute flow, I agree it feels a bit copypastey so a better flow would be passing values as ref to a function to avoid the code dupe
Hi, thank you for your guide. I'm trying to follow it step by step but I'm stuck at 4:00 as I don't have almost any of your folders and files on the left as you have and I don't know where I should put the code you're showing
@@DanGoodayleUnreal under the project folder i do not have any folders, while you have characters attributes and abilities and relative files. I just have the build.cs file, the cpp, the character cpp and h and the gamemode cpp and h
Ah I see! This was all built from scratch in these tutorials: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-NtSGfkPvPt0.html&ab_channel=DanGoodayle, the playlist goes through the creation of each one of those files. You will also be able to do it by using just the standard classes you've mentioned, just needing to adapt the code I'm showing to work with your project.
Super useful! I wonder about the animation notify, I thought on a dedicated server that animations aren't actually playing. But from your example, does this suggest it will still figure out when to trigger the notify without me being dependent on the client to tell it? One more note, the "A Guided Tour of Game Abilities | Inside Unreal" from Epic suggests an easier way to initialize values. On the BP class of the Ability System Component on the Instigator, find the Default Starting Data property, and add the AttributeSet class as the attribute, and use the Data Table to be the Default Starting Table.
Hey there! Yes you can use that system, however I prefer directly using gameplay effects. I haven’t seen any projects using the default starting data for a while now so I don’t recommend it personally. The animation notifies - I would need to check as I’m currently away from any pcs or code - but I _think_ animation montages still play on the server, but don’t tick bone positions. The notify should still trigger. Again, I’d need to confirm as I don’t know off hand if that’s true or not.
This was pretty good but you started losing me after jumping between files without showing which was open, and never actually being able to see the full source too much pausing and squinting required. The compression is not kind to a small font. Still good stuff.
do you might consider putting this project on git ? its great but hard to follow where i am lacking headers or definitions.. i know its pretty hard to keep everything in mind, for me its just a nice to have thing
@@DanGoodayleUnreal ohh I see... Yea I'm using the base third person template in C++. I guess they did it like that. I also had to set the InitialAbilitySet, InitialGameplayEffect and AbilityInputBindings to EditAnywhere because otherwise it would not let me edit them, I'm guessing because of the way the classes are setup and/or inherited but I'm not entirely sure since I'm recently learning these things. If you have any insight on why this is let me know. Anyways thank you so much for everything. This is probably the best video on this topic. I'm eternally grateful.
@@fidel_soto so if they are edit defaults only you can only edit it within the blueprint, if you place them in a level you can only edit them with EditAnywhere
at 14:24 I dont see the enumerator values at all and thank you for taking the times to reply to most if not all comments it really means a lot after 4 now deleted edits this should be my final one, Get ability system component blueprint causes the is valid check to fail which I believe is causing the whole system to fail, also does apply gameplay effect spec's target have to be the ability system component or can it be gameplay ability because mine says gameplay ability and that also might be a failing point, also it says my health is zero when I have it set to 100 so idk whats happening
@@DanGoodayleUnreal I don't quite remember, I put my project down at least for now. I appreciate your trying to help but it comes too late, I really look forward to your next video on GAS. Have a wonderful day!
I’m still watching through this, but wanted to comment that I personally find the background at the start of the video, continuing until 3:30 or so, a bit nauseating. It looks like a swirling sample of human tissue. I thought maybe it was something from Diablo 4 which I haven’t played, but out of context, it’s distracting from your great teaching content. Thanks for hearing me out 😁
@@DanGoodayleUnreal it might just be the color of it all and correcting it might be enough. Or playing it slower (prob. a bad idea from someone who doesn’t video edit much)? Trying it find a way not to give you more work, but I genuinely appreciate the reply and the content! Have a great one.
@@BurtonPosey ah it's no problem! I found it relaxing personally but I can totally understand it making people feel uncomfortable too, sadly didn't see that before I uploaded 😆
@DanGoodayle ya just been messing around with shooters but wanted more Strategy and rpg. So this is exactly what I want but never done plug-ins or coded so we shall see how much hair I have left after learning this 🤣🤣🤣
I couldn't get the AnimNotify to work, but taking this part off everything worked fine! Anyway, it would really help if you shower how you created all these BP's and Classes instead of just showing them already finished... a lot of parts I had to stop and spent reasonable time looking for in the internet on how to create what you were using.
Unless you are buying a plugin there isn’t a way to setup GAS in blueprints. Then recommended way I’ve seen it used in big projects is C++ with blueprint abilities as I showed 👍
So at 4:02 I don't even see Gameplay Abilities in my private or Public folders. I wonder why could this be? I enabled the plugin in the project and generated my visual studio files. Not sure where I'm messing up.
thank you so much for making this so easy to follow and understand. Would this be possible to do with just blueprints and not c++? sorry if this is a dumb question im pretty new to unreal.
Hey there - no problem. Sadly no - out of the box this requires some C++ code. But I'm happy to help guide people getting started with things. There isn't much C++ you need to write to get things working.
@@DanGoodayleUnrealI am making a mod for Conan exiles and their death kit prevents us from accessing the c+ Plus directly.. we can only use the visual programming nodes
@@DanGoodayleUnreal why is there an attribute helper class where did all that come from?? at least take a moment to explain everything you are creating
@@the_clown I mentioned this at 4:14. In this case I've created a header file called "AttributeHelpers.h" and then created a macro which takes 4 of the Unreal Macros (`GAMEPLAYATTRIBUTE_PROPERTY_GETTER` etc) and just made them into a single line for the sake of readability. For more context you can go to Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/AttributeSet.h and read the comments on line 407 -> 426. Hope that helps!
@@DanGoodayleUnreal I already figured that out after debugging for a bit it was my ide that didn't let me do it the way you did yours was written as ATTRIBUTE_ACCESSORS but mine had to be written as ATTRIBUTEACCESSORS don't know why. My current issue is that Data.Evaluate.Something keeps telling me it's an incomplete type
Really nice guide, but i cannot complete SetupPlayerInputComponent function and i would love to see source code for your character setup i missed how playerEnhancedInputComponent was set up
Hey there! Thank you, for the player input setup I made this video 🫡 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-NtSGfkPvPt0.htmlsi=tUZMHL8-N7LZpcgy
Hello!Thank you for the tutorial, helps a lot to clarify things up :) If I may ask, what IDE are you using (Is that Rider?) ? I've been using VS but I feel a but overwhelmed about it, since I only use it for Unreal Engine and feel like I spent a lot of time fighting with to make it work. Do you have a similar experience with your current IDE, and would you recommend it over VS in the case of a solo dev that is gonna use GA for their project? I agree with some comments that the background at the start is a bit distracting and might be a bit nauseous or disturbing for some people. Otherwise, great video, it's nice you are zooming on things you are talking about!
Thank you! Yes it’s Rider, I prefer it myself and swapped to it from VS a couple of years back as I found it had better performance with UE when I swapped (VS has probably caught up now, but I don’t know as I don’t use it). I’ve stopped using those backgrounds in my latest videos 😀 I’ve been trying out new things to see what works and really miscalculated that background 😅
If i wanted to add a hit animation on the enemy u hit, what combination of gameplay effects, gameplay abilitys, and/or gameplay cues should i use? currently i have a Gameplay cue that is tied to a gameplay effect of taking dmg, and it does successfully trigger a niagara effect. however it does not play a montage i have made. is it that u cant play animations in a gameplay cue?
You could play the anim with a gameplay cue, if you’d probably want to cause an ability activation via a tag being added? You’d want to add the gameplay ability first, set its activation to tag add and then apply a gameplay effect that adds that tag
Hi, how exactly did you handle dealing damage? In GE you change Damage Attrbiute - shouldn't damage attribute be responsible for calculating how much damage WE are dealing, and we instead, should be modyfing Health attrbiute, by whatever damage attribute value we are having?
Good question! I usually use the damage as a meta attribute on the target, then when the damage attribute changes it then modifies the health attribute. That way if I have things like armor or shields as an attribute I can then take from those attribute first before modifying the health. That way when you only need to apply “damage” to a target, knowing that shield and armor stats are handled with it. Even if you don’t have those extra attributes right now, having that split means you don’t have to remake all of your effects in the future if you do actually add them. I also use an execution modifier on the effect to modify the outgoing damage by incoming / outgoing damage modifier’s so I can add global modifiers to a character (like a 2x damage buff)
I don’t know.. I haven’t tried. Off hand I don’t think it explicitly expects 2d or 3d so you may not need to modify much, maybe the targeting systems will need to be made to support 2d?
Ty for this concise video! I managed to get a basic attack working but I noticed there are several places where the attributes under the detail panel do not show up on my end. May I ask what version you are using? My engine version is 5.3.
@@DanGoodayleUnreal I have the same issue in 5.3 I have created a new GameplayEffect after following all of the other steps, but when I go in the Class Defaults I have way less options than what you are showing in the video. I have Status, Duration, Gameplay Effect, Gameplay Cues, and Stacking, but none of the other defaults, like Period, or Tags.
Do I correctly understand that if we set up the ability system just like you did, the rest is just adding more and more blueprits to fill out the game with abilities? It's a great tutorial, fast - but packed with meat!
@@DanGoodayleUnreal Yeah, especially with the stats I see. I already introduced some logic how stats are percieved by my classless RPG game and how they do modify the health or base damage. I guess I will have to learn C++ a little bit more :D Btw: that fast replay, respect
I have 3 questions: 1. Can you elaborate more on the anim notify at 20:14 and how to set that up correctly? I don't see any options to add event tags to the anim notify. 2. If I add a function called received notify, how do I get the mesh comp, animation, and event reference to show up? 3. How do you make the get owner node have "target is actor component?" Mine says "target is actor." Thank you for the video!
Heya! So that anim notify is just a quick one I made in blueprint, extending from AnimNotify. You then override the RecievedNotify function to add the gameplay event. You can expose the Gameplay Tag as a property on the blueprint to have it show up in the Animation Montage view. For #3, try extending from the AnimNotify and that should give you what you are after.
I created an ability that spawns a projectile, but its only spawning on the server and on the client that fires it, and not on the other clients. Any advice as to why this is and what to do?
I multicasted the function to spawn the projectile and set the ability to trigger only on the server (it calls a function on the server and this functions calls the multicasted one) but something tells me this might not be the correct way to do it.
Multicasts are likely to get dropped in high net traffic situations, replication is quite complex so giving you a one fits all solution isn’t possible in a comment BUT, think of it like this, who is the information relevant to?, the server, yes and the person affected. I’ll post a video in the future hiding some of the latency issues and deep diving.
@@DanGoodayleUnreal I thought abilities supported replication like at the end of your video where your characters play their montage correctly but in my case only the player that is also the server spawns the projectile on the other client. Its even weirder because the other client does not spawn the projectile visually but the first client does collide with it when he comes in contact with where the projectile should be. I don't know if it is an issue with spawning objects or if I have a deeper flaw in the logic. (Now that I write about it, maybe spawning isnt allowed on clients and thats what the ability system is trying to do, hence the issue) So like I said before the only thing that worked was... the ability calls a function on the server and that function calls the spawning logic on a multicast function. That way the projectile did spawn everywhere correctly. However I'm convinced I'm missing something. Otherwise... is that really the way to do it? To set the ability to replicate server only and make it call a multicast?
@@DanGoodayleUnreal So yea, I was missing something... I had to mark bReplicates = true on the projectile class. Then it all works as expected, without a multicast function or anything. Perfect. Once again thank you very much for the tutorial. I was finally able to grasp GAS and take my skills to the next level. *Thank you.* 🙇♂
Thanks! I'll be making a lot more in the future, currently running a poll on Twitter to choose what's next twitter.com/DGoodayle/status/1714206342368395596
i do have the plugin now, but to be honest i haven't used it much. if im not mistaken the plugin essentially brings the C++ side of things into blueprints so you don't have to touch C++ other than intial setup. but to be honest again, i dont really know becuase i never r3ally used it, at least not yet @@stabbedbyapanda