I am making great progress as I was able to spend most of Saturday and a good portion of Sunday working on setting up and activating the gameplay ability system using ability tasks and input actions.
Building on the code foundation has been a fun experience as I can see the system forming and the relationships between the different elements of the game starting to tie into one another.
One of the interesting bits I learned more about was templates and static function pointers. These allow you to point to any function signature you want and call it by pointer. It acts as an alias for a really complex type signature so you can call anything you want using that signature.
// Alias for complex type that is a template. Function pointer capable of storing the address of a function of any function signature
template<class T>
using TStaticFuncPtr = typename TBaseStaticDelegateInstance<T, FDefaultDelegateUserPolicy>::FFuncPtr;
I got a ton of stuff accomplished and am eager to keep building towards an awesome ability set for each class. I was also able to revisit and solve a tricky bug that I backlogged in frustration a while back that was causing some animations to display the primary weapon in the wrong location relative to the weapon bone and socket on the right hand of the player. I have a better understanding of how the system works and that made it much easier to solve the issue this time. Previously I would use reference viewer and poke my way through the code and try things. Now I know that it can only be handled in a couple spots and when I checked those spots it was clear what the issue was that was causing my problem.
The system is robust and I have control over every press, hold and release of all input actions now using an input mapping context to map the values.
Here's all the stuff I worked on:
Setup base custom gameplay ability class to handle all ability types
Added code to grant abilities and a function to perform this on character init
Created a test gameplay ability to make sure all the code was firing properly
Setup an input config data asset to control different inputs centrally via tags
Created an input mapping context to reuse throughout the game
Setup the ability system input component to handle press, hold, and release of inputs
Added data asset to player controller for the input config
Setup callbacks for ability inputs
Added all the code for activating abilities
Fixed weapon slot socket location on mannequin by checking its position against several different animations
Set enemy blueprint to use the new parent class animation blueprint template
Created a custom animation blueprint for the common player characters
Fixed an issue with inputs getting blocked due to improperly set priorities on input mapping contexts
Added input actions for hot bar buttons, mouse controls, and cameras
Adjusted the attribute menu UI to condense the information better and use less screen real estate (WIP)
Tomorrow I have the day off so I plan to work on projectiles spells for the caster classes. Finally getting into spellcasting and some of the cool stuff!
Cheers, Vinny
Commentaires