Hi there, i’m new to UE so I figured i’d start off by learning how to animate my characters which has resulted in me watching basic tutorial videos for the past 2 weeks or so. I decided to start by designing an ability system where the effects and animations change depending on what type of weapon the player is holding. Each ability has 3 parts to it (basically I check for a button press during a certain time frame within my animation montages using AnimNotifys). I wanted to create a function that takes 3 variables: the character’s weapon type, the ability key, and the attack sequence number (first swing of LMB = 1, second =2, etc). I was planning on using those 3 variables to traverse the content package and find the correct montage to play.
Example: The variables we will pass in are “Axe”, “LMB”, and 1. With this we will go to the Axe directory and search for the montage named “LMB1” (concatenation of our ability hotkey and attack sequence inputs).
Unfortunately, I haven’t been able to find any solid videos that demonstrate designing dynamic ability systems, which has brought me here to ask some questions:
- Is this actually possible to do through blueprints? If not, how about C++?
- Is this an inefficient way to handle this? I’ve thought of some other ways to do this that seem like they’d be more inefficient than this method, and without a solid handle of UE4’s engine I feel like i’m missing a lot of options.
- If you don’t mind sharing, have any of you designed a similar system? If so, how did you go about it?
Thanks a a lot in advance guys! I’ve been posting my questions here and on reddit recently and everyone has been so helpful so far!
i assume what you are trying to say is “is making a Ability System in which each weapon has different abilities possible in blueprint?”
the answer to that is yes. this is possible in both c++ and bp.
2-) not really.
3-) i have not really done anything like a ability system but something like a dynamic ability system is not a small task. i recommend that you actually look into learning either ue4 c++ api or ue4 bps or both before going ahead.
I haven’t had the chance to set this up but from my general experience I’ll try to give some global advice, maybe it’ll give you ideas. But, you shouldn’t use files directly, everything can be done inside UE, variables, references, data structures, etc
- You could check some free available projects that might use this and see how they do it. Maybe the Action RPG project in the marketplace has a combo system.
- I could suggest thinking about how modular the Animation Blueprint is, basically the State machine.
- You could also think about using a Data storing system, either a DataTable or a Map/Array where you store the information of each sequence and then at runtime retrieve the animation/montage to use from that. Like for example a Map where the Key is the WeaponType and the value is a struct that has an array of all possible sequences
- You could check plugins, it is sometimes ok to spend some money to both gain time and learn from how the plugins is made. Although, be very very careful of badly programmed plugins. You don’t want to learn bad habits, bad programming.
Again, I didn’t implement something like this before so I haven’t done any research on what UE itself offers in its Ability feature or how other games have done this, but, I hope the ideas above can give you some insight. Good luck!!